From: Killery Date: Thu, 22 Oct 2015 10:01:03 +0000 (+0900) Subject: 占領していないのに敵の陣地になってしまうバグを修正 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=8d9ac502e3e08231839d09c58dfbacadb13c453c;p=awarsiii%2FAwarsIV.git 占領していないのに敵の陣地になってしまうバグを修正 --- diff --git a/Awars III/FieldView.m b/Awars III/FieldView.m index 0a85dca..7f4401f 100755 --- a/Awars III/FieldView.m +++ b/Awars III/FieldView.m @@ -279,6 +279,32 @@ 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){ @@ -310,31 +336,7 @@ 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){ diff --git a/Awars III/UnitChipList.h b/Awars III/UnitChipList.h index e1495bf..825b9dc 100755 --- a/Awars III/UnitChipList.h +++ b/Awars III/UnitChipList.h @@ -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;