OSDN Git Service

占領していないのに敵の陣地になってしまうバグを修正
authorKillery <Killery@kiritani-no-mac-mini.local>
Thu, 22 Oct 2015 10:01:03 +0000 (19:01 +0900)
committer桐谷 諭史 <Killery@kiritani-no-Mac-mini.local>
Thu, 22 Oct 2015 10:01:03 +0000 (19:01 +0900)
Awars III/FieldView.m
Awars III/UnitChipList.h

index 0a85dca..7f4401f 100755 (executable)
         createFlag = false;
     }
 
+        if(Uselected)
+    if(Uselected->dead){
+        Uselected = NULL;
+    }
+    
+    if(cslRdy){
+        [self LookupSummonRange:possionY startY:possionX aPiece:&UC[unitNum[possionX][possionY]] turnSide:YES];
+        cslRdy = false;
+    }
+    
+    if(buildCaptureFlag && unitMoveEndFlag){
+        
+        BTop = B;
+        while (B) {
+            if(B->x == Uselected->x && B->y == Uselected->y){
+                if(Uselected->team == 0) B->team = 0;
+                if(Uselected->team == 1) B->team = 1;
+                if(Uselected->team == 2) B->team = 2;
+                unitColorInitFlag = true;
+            }
+            B = B->next;
+        }B = BTop;
+    
+        buildCaptureFlag = false;
+    }
+    
     if(unitColorInitFlag){
         U = UTop;
         while(U){
         unitColorInitFlag = false;
         
     }
-    if(Uselected)
-    if(Uselected->dead){
-        Uselected = NULL;
-    }
-    
-    if(cslRdy){
-        [self LookupSummonRange:possionY startY:possionX aPiece:&UC[unitNum[possionX][possionY]] turnSide:YES];
-        cslRdy = false;
-    }
-    
-    if(buildCaptureFlag && unitMoveEndFlag){
-        
-        BTop = B;
-        while (B) {
-            if(B->x == possionX && B->y == possionY){
-                if(Uselected->team == 0) B->team = 0;
-                if(Uselected->team == 1) B->team = 1;
-                if(Uselected->team == 2) B->team = 2;
-                unitColorInitFlag = true;
-            }
-            B = B->next;
-        }B = BTop;
-    
-        buildCaptureFlag = false;
-    }
+
     
     if(cpuAImodeflag){
         
index e1495bf..825b9dc 100755 (executable)
@@ -6,7 +6,6 @@
 //  Copyright (c) 2012年 Killery. All rights reserved.
 //
 
-
 typedef struct _RESIST{
 
     int blow;
@@ -273,25 +272,14 @@ typedef struct _STATUS{
 
 }STATUS;
 
-typedef struct _SKILL{
-    struct _SKILL *next;
-    
-    int index;
-    int type;
-    
-    int list[255];
-    double cost[255];
-    int Lv[255];
-
-
-}SKILL;
+struct _SKILL;
 
 typedef struct _UNITCHIP{
     
     RESIST R_C;
     RESIST R_M;
     ATTACK *A;
-    SKILL *S;
+    struct _SKILL *S;
     
     NSString *name;
     NSString *nameNick;
@@ -337,6 +325,19 @@ typedef struct _UNITCHIP{
     
 }UNITCHIP;
 
+typedef struct _SKILL{
+    struct _SKILL *next;
+    
+    int index;
+    int type;
+    
+    int list[255];
+    double cost[255];
+    int Lv[255];
+    UNITCHIP UC[255];
+    
+}SKILL;
+
 typedef struct _SKILLLIST{
     struct _SKILLLIST *next;