OSDN Git Service

ちょっとしたバグを修正
authorKillery <Killery@kiritani-no-mac-mini.local>
Sun, 10 Apr 2016 20:20:12 +0000 (05:20 +0900)
committerKillery <Killery@kiritani-no-Mac-mini.local>
Sun, 10 Apr 2016 20:20:12 +0000 (05:20 +0900)
Awars III/Awars III-Info.plist
Awars III/FieldScene.h
Awars III/FieldScene.m
Awars III/FieldView.m
Awars III/MapEditor.h
Awars III/en.lproj/MainMenu.xib

index 97e8be8..a703bff 100644 (file)
@@ -15,7 +15,7 @@
        <key>CFBundlePackageType</key>
        <string>APPL</string>
        <key>CFBundleShortVersionString</key>
-       <string>0.63</string>
+       <string>0.631</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
index 12a21f5..9af9edf 100755 (executable)
@@ -157,6 +157,7 @@ UNITCHIP *BRU;
 int BRUindex;
 
 bool wtRdy;
+bool wtRdy2;
 bool wtRdyB;
 int wtPx, wtPy, wtUnitNum;
 UNIT *unitBreak;
@@ -274,6 +275,7 @@ UNITPOINT *UP;
 UNITPOINT *UPT;
 
 bool pussyLoopFlag;
+bool pussyCumsOnlyOnceFlag;
 
 int wtflag;
 
index adaf6df..6ef7046 100755 (executable)
 -(void)clickCRL:(id)sender{
     
     crCRL = (int)[CResearchListTV clickedRow];
-    
+    if(crCRL < 0)
+        return;
     BUILDCHIP *B;
     
     B = &BC[buildNum[possionX][possionY]];
     
     U = UTop;
     U = unitBreak;
-    if(battleBegin)
+    if(battleBegin && !wtRdy2)
         while (!wtRdy) {
             wtPx = 0;
             wtPy = 0;
                 }
                 if(U->C.S_C.WT <= 0 && !U->dead){//WTターン周り
                     U->C.S_C.WT = 0;
+                    
                     wtUnitNum = U->number;
                     wtPx = U->x;
                     wtPy = U->y;
                     wtRdy = true;
+                    wtRdy2 = true;
                     unitBreak = U;
                     possionX = unitBreak->x;
                     possionY = unitBreak->y;
             }
             eventTime++;
             U = UTop;
+            pussyCumsOnlyOnceFlag = false;
+            wtRdy = true;
+            
+            
+            [self EventFunc];
             if(!U) break;
+            
         }
     lolwtfshit:{}
     U = UTop;
         waitSwtichFlag = false;
         
         wtRdy = false;
+        wtRdy2 = false;
         Uselected = NULL;
         
         endGamePanelWait = 100;
         
         
         wtRdy = false;
+        wtRdy2 = false;
+        
         Uselected = NULL;
     
     }if(stageClearFlag){
         setBattleModeFlag = false;
         
         wtRdy = false;
+        wtRdy2 = false;
+        
+        
         Uselected = NULL;
         
     }
         setBattleModeFlag = false;
         
         wtRdy = false;
+        wtRdy2 = false;
         Uselected = NULL;
         
     }
     }
     }
     
-    if(battleBegin && !pussyLoopFlag){
+    w000p:
+    
+    if(CPUAttackSubmitFlag){
+        battleFlag = true;
+        CPUAttackSubmitFlag = false;
+        windowPoint.x = [mapWindow frame].origin.x;
+        windowPoint.y = [mapWindow frame].origin.y;
+        [atkPanel setFrameOrigin:windowPoint];
+    }
+    
+    
+    static int oopsCnt = 30;
+    
+    U = UTop;
+    
+    
+    if(Utarget){
+    
+    if(battleFlag &&
+       ((MF[MFselectedRow+1].MS.playerSet1 == 2 && MF[MFselectedRow+1].MS.playerSet2 == 2) ||
+        (unitBreak->team == 2 && Utarget->team == 1) || (unitBreak->team == 1 && Utarget->team == 2) ||
+        (unitBreak->team == 1 && Utarget->team == 1) || (unitBreak->team == 2 && Utarget->team == 2))
+       ){
+        if(!(AVpreview.rate > 0) && !animationFlag1 && !animationFlag2)
+            oopsCnt--;
+        if(oopsCnt > 0)
+            return;
+        else{
+            oopsCnt = 30;//cpu攻撃ナビ
+        }
+        
+        battleFlag = false;
+        battleRdy = false;
+        battleSet1Flag = false;
+        battleSet2Flag = false;
+        battleSettingFlag = false;
+        [self AttackDisplay];
+        windowPoint.x = [mapWindow frame].origin.x;
+        windowPoint.y = [mapWindow frame].origin.y;
+        [battleWindow setFrameOrigin:windowPoint];
+        [battleWindow makeKeyAndOrderFront:nil];
+        [battlePanel close];
+    }
+    }
+    if(Utarget){
+    if(battleRdy &&
+       ((Utarget && MF[MFselectedRow+1].MS.playerSet1 == 2 && MF[MFselectedRow+1].MS.playerSet2 == 2) ||
+        (unitBreak->team == 2 && Utarget->team == 1) || (unitBreak->team == 1 && Utarget->team == 2) ||
+        (unitBreak->team == 1 && Utarget->team == 1) || (unitBreak->team == 2 && Utarget->team == 2)
+        )
+       ){
+        
+        if(!(AVpreview.rate > 0) && !animationFlag1 && !animationFlag2)
+            oopsCnt--;
+        if(oopsCnt > 0)
+            return;
+        else{
+            oopsCnt = 30;//cpu攻撃準備
+        }
+        
+       bLoopFlag = false;
+    }
+    }
+    U = UTop;
+    
+
+}
+
+-(void)EventFunc{
+
+    if(battleBegin && !pussyLoopFlag && !pussyCumsOnlyOnceFlag){
         bool proccessTrue = false;
         static bool onlyBigin = false;
         MAPSCRIPT MS = MF[MFselectedRow+1].MS;
         MAPSCRIPTD *MSDtop;
         MSDtop = MSDTO;
         if(!MSDtop)
-            goto w000p;
+            return;
         
         
         if(!onlyBigin){
             
             
             enum{
-            ENTIRE_MAP,
-            CENTER_POINT
+                ENTIRE_MAP,
+                CENTER_POINT
             };
             
             while(MS.D){
             }
             
             if(MS.D)
-            while(MS.D->P){
-                if(MS.D->P->endFlag)
-                    MS.D->P = MS.D->P->next;
-                else
-                    break;
-            }
+                while(MS.D->P){
+                    if(MS.D->P->endFlag)
+                        MS.D->P = MS.D->P->next;
+                    else
+                        break;
+                }
             if(!MS.D->P){
                 MS.D->endFlag = true;
                 messageDialog = false;
                     }MS.D->P = MSDPT;
                     
                     if(resultFailFlag)
-                    while(MS.D->P){
-                        MS.D->P->endFlag = false;
-                        MS.D->P = MS.D->P->next;
-                    }MS.D->P = MSDPT;
+                        while(MS.D->P){
+                            MS.D->P->endFlag = false;
+                            MS.D->P = MS.D->P->next;
+                        }MS.D->P = MSDPT;
                     
                 }else if(MS.D->ETtype == 2){
                     
                     }MS.D->P = MSDPT;
                     
                     if(resultFailFlag)
-                    while(MS.D->P){
-                        MS.D->P->endFlag = false;
-                        MS.D->P = MS.D->P->next;
-                    }MS.D->P = MSDPT;
+                        while(MS.D->P){
+                            MS.D->P->endFlag = false;
+                            MS.D->P = MS.D->P->next;
+                        }MS.D->P = MSDPT;
                 }else if(MS.D->ETtype == 3){
                     
                     bool resultFailFlag = false;
                     }MS.D->P = MSDPT;
                     
                     if(resultFailFlag)
-                    while(MS.D->P){
-                        MS.D->P->endFlag = false;
-                        MS.D->P = MS.D->P->next;
-                    }MS.D->P = MSDPT;
+                        while(MS.D->P){
+                            MS.D->P->endFlag = false;
+                            MS.D->P = MS.D->P->next;
+                        }MS.D->P = MSDPT;
                     //NSLog(@"%d", UTop->x);
                 }else if(MS.D->ETtype == 4){
                     while(MS.D->P){
             }
             
             if(MS.D->switch1)
-            for(int i = 0;*(MS.D->switch1+i)>0;i++){
-                if(Suicchi[*(MS.D->switch1+i)])
-                    continue;
-                
-                EventFailFlag = true;
-            }
+                for(int i = 0;*(MS.D->switch1+i)>0;i++){
+                    if(Suicchi[*(MS.D->switch1+i)])
+                        continue;
+                    
+                    EventFailFlag = true;
+                }
             
             if(MS.D->switch2)
-            for(int i = 0;*(MS.D->switch2+i)>0;i++){
-                if(!Suicchi[*(MS.D->switch2+i)])
-                    continue;
-                
-                EventFailFlag = true;
-            }
+                for(int i = 0;*(MS.D->switch2+i)>0;i++){
+                    if(!Suicchi[*(MS.D->switch2+i)])
+                        continue;
+                    
+                    EventFailFlag = true;
+                }
             
             
             if(MS.D->ET3 <= eventTime)
                 proccessTrue = false;
                 EventFailFlag = true;
             }
-           
+            
             if(MS.D->endFlag)
                 continue;
             
                 continue;
             }
             
-        if(proccessTrue)
-        switch (proccesType) {
-                
-            case ENTIRE_MAP:
-                MS.D->P = [self setEvent:MS.D->P];
-                if(messageDialog){
-                    MS.D->P = MSDPtop;
-                    MS.D = MSDtop;
-                    return;
-                }
-                if(waitSwtichFlag) {
-                    MS.D->P = MSDPtop;
-                    MS.D = MSDtop;
-                    return;
-                }if(backTitleFlag){
-                    MS.D->P = MSDPtop;
-                    MS.D = MSDtop;
-                    return;
-                
-                }if(stageClearFlag){
-                    MS.D->P = MSDPtop;
-                    MS.D = MSDtop;
-                    return;
-                    
-                }if(gameOverFlag){
-                    MS.D->P = MSDPtop;
-                    MS.D = MSDtop;
-                    return;
-                    
-                }
-                MS.D->P = MSDPtop;
-                break;
-            case CENTER_POINT:
-                MS.D->P = [self setEvent:MS.D->P];
-                if(messageDialog){
-                    MS.D->P = MSDPtop;
-                    MS.D = MSDtop;
-                    return;
-                }
-                if(waitSwtichFlag) {
-                    MS.D->P = MSDPtop;
-                    MS.D = MSDtop;
-                    return;
-                }if(backTitleFlag){
-                    MS.D->P = MSDPtop;
-                    MS.D = MSDtop;
-                    return;
-                    
-                }if(stageClearFlag){
-                    MS.D->P = MSDPtop;
-                    MS.D = MSDtop;
-                    return;
-                    
-                }if(gameOverFlag){
-                    MS.D->P = MSDPtop;
-                    MS.D = MSDtop;
-                    return;
-                    
+            if(proccessTrue)
+                switch (proccesType) {
+                        
+                    case ENTIRE_MAP:
+                        MS.D->P = [self setEvent:MS.D->P];
+                        if(messageDialog){
+                            MS.D->P = MSDPtop;
+                            MS.D = MSDtop;
+                            return;
+                        }
+                        if(waitSwtichFlag) {
+                            MS.D->P = MSDPtop;
+                            MS.D = MSDtop;
+                            return;
+                        }if(backTitleFlag){
+                            MS.D->P = MSDPtop;
+                            MS.D = MSDtop;
+                            return;
+                            
+                        }if(stageClearFlag){
+                            MS.D->P = MSDPtop;
+                            MS.D = MSDtop;
+                            return;
+                            
+                        }if(gameOverFlag){
+                            MS.D->P = MSDPtop;
+                            MS.D = MSDtop;
+                            return;
+                            
+                        }
+                        MS.D->P = MSDPtop;
+                        break;
+                    case CENTER_POINT:
+                        MS.D->P = [self setEvent:MS.D->P];
+                        if(messageDialog){
+                            MS.D->P = MSDPtop;
+                            MS.D = MSDtop;
+                            return;
+                        }
+                        if(waitSwtichFlag) {
+                            MS.D->P = MSDPtop;
+                            MS.D = MSDtop;
+                            return;
+                        }if(backTitleFlag){
+                            MS.D->P = MSDPtop;
+                            MS.D = MSDtop;
+                            return;
+                            
+                        }if(stageClearFlag){
+                            MS.D->P = MSDPtop;
+                            MS.D = MSDtop;
+                            return;
+                            
+                        }if(gameOverFlag){
+                            MS.D->P = MSDPtop;
+                            MS.D = MSDtop;
+                            return;
+                            
+                        }
+                        MS.D->P = MSDPtop;
+                        break;
+                        
+                    default:
+                        MS.D->P = MSDPtop;
+                        break;
                 }
-                MS.D->P = MSDPtop;
-                break;
-                
-            default:
-                MS.D->P = MSDPtop;
-                break;
-        }
             
             MS.D->P = MSDPtop;
             continue;
         }
         MS.D = MSDTO;
-   
+        
         while(MS.D){
             
             MAPSCRIPT0 *MSDPT = MS.D->P;
-        if(MS.D->ETtype == 0){
-            while(MS.D->P){
-                MS.D->P->succeessfulFlag = true;
-                MS.D->endFlag = true;
-                MS.D->P = MS.D->P->next;
-            }MS.D->P = MSDPT;
-        }else if(MS.D->ETtype == 1){
-            bool resultFailFlag = false;
-            while(MS.D->P){
-                if(!MS.D->P->endFlag)
-                    resultFailFlag = true;
-                MS.D->P = MS.D->P->next;
-            }MS.D->P = MSDPT;
-            
-            if(resultFailFlag)
+            if(MS.D->ETtype == 0){
                 while(MS.D->P){
-                    MS.D->P->succeessfulFlag = false;
-                    MS.D->endFlag = false;
+                    MS.D->P->succeessfulFlag = true;
+                    MS.D->endFlag = true;
                     MS.D->P = MS.D->P->next;
                 }MS.D->P = MSDPT;
-            
-        }else if(MS.D->ETtype == 2){
-            
-            bool resultFailFlag = false;
-            while(MS.D->P){
-                if(!MS.D->P->succeessfulFlag)
-                    resultFailFlag = true;
-                MS.D->P = MS.D->P->next;
-            }MS.D->P = MSDPT;
-            
-            if(resultFailFlag)
+            }else if(MS.D->ETtype == 1){
+                bool resultFailFlag = false;
                 while(MS.D->P){
-                    MS.D->P->succeessfulFlag = false;
-                    MS.D->endFlag = false;
+                    if(!MS.D->P->endFlag)
+                        resultFailFlag = true;
                     MS.D->P = MS.D->P->next;
                 }MS.D->P = MSDPT;
-        }else if(MS.D->ETtype == 3){
-            
-            bool resultFailFlag = false;
-            while(MS.D->P){
-                if(!MS.D->P->succeessfulFlag){
-                    resultFailFlag = false;
-                    break;
-                }
-                resultFailFlag = true;
-                MS.D->P = MS.D->P->next;
-            }MS.D->P = MSDPT;
-            
-            if(resultFailFlag)
+                
+                if(resultFailFlag)
+                    while(MS.D->P){
+                        MS.D->P->succeessfulFlag = false;
+                        MS.D->endFlag = false;
+                        MS.D->P = MS.D->P->next;
+                    }MS.D->P = MSDPT;
+                
+            }else if(MS.D->ETtype == 2){
+                
+                bool resultFailFlag = false;
+                while(MS.D->P){
+                    if(!MS.D->P->succeessfulFlag)
+                        resultFailFlag = true;
+                    MS.D->P = MS.D->P->next;
+                }MS.D->P = MSDPT;
+                
+                if(resultFailFlag)
+                    while(MS.D->P){
+                        MS.D->P->succeessfulFlag = false;
+                        MS.D->endFlag = false;
+                        MS.D->P = MS.D->P->next;
+                    }MS.D->P = MSDPT;
+            }else if(MS.D->ETtype == 3){
+                
+                bool resultFailFlag = false;
+                while(MS.D->P){
+                    if(!MS.D->P->succeessfulFlag){
+                        resultFailFlag = false;
+                        break;
+                    }
+                    resultFailFlag = true;
+                    MS.D->P = MS.D->P->next;
+                }MS.D->P = MSDPT;
+                
+                if(resultFailFlag)
+                    while(MS.D->P){
+                        MS.D->P->succeessfulFlag = false;
+                        MS.D->endFlag = false;
+                        MS.D->P = MS.D->P->next;
+                    }MS.D->P = MSDPtop;
+            }else if(MS.D->ETtype == 4){
                 while(MS.D->P){
                     MS.D->P->succeessfulFlag = false;
                     MS.D->endFlag = false;
                     MS.D->P = MS.D->P->next;
-                }MS.D->P = MSDPtop;
-        }else if(MS.D->ETtype == 4){
-            while(MS.D->P){
-                MS.D->P->succeessfulFlag = false;
-                MS.D->endFlag = false;
-                MS.D->P = MS.D->P->next;
-            }MS.D->P = MSDPT;
+                }MS.D->P = MSDPT;
+            }
+            
+            MS.D->P = MSDPT;
+            MS.D = MS.D->next;
         }
         
-        MS.D->P = MSDPT;
-        MS.D = MS.D->next;
-    }
-
-    MS.D = MSDtop;
-    
-    
-    
-        MF[MFselectedRow+1].MS.D = MS.D;
-        cpuTurnEndFlag = false;
-        battleSetUpIgnore = false;
-    }
-w000p:
-    
-    if(CPUAttackSubmitFlag){
-        battleFlag = true;
-        CPUAttackSubmitFlag = false;
-        windowPoint.x = [mapWindow frame].origin.x;
-        windowPoint.y = [mapWindow frame].origin.y;
-        [atkPanel setFrameOrigin:windowPoint];
-    }
-    
-    
-    static int oopsCnt = 30;
-    
-    U = UTop;
-    
-    
-    if(Utarget){
-    
-    if(battleFlag &&
-       ((MF[MFselectedRow+1].MS.playerSet1 == 2 && MF[MFselectedRow+1].MS.playerSet2 == 2) ||
-        (unitBreak->team == 2 && Utarget->team == 1) || (unitBreak->team == 1 && Utarget->team == 2) ||
-        (unitBreak->team == 1 && Utarget->team == 1) || (unitBreak->team == 2 && Utarget->team == 2))
-       ){
-        if(!(AVpreview.rate > 0) && !animationFlag1 && !animationFlag2)
-            oopsCnt--;
-        if(oopsCnt > 0)
-            return;
-        else{
-            oopsCnt = 30;//cpu攻撃ナビ
-        }
+        MS.D = MSDtop;
         
-        battleFlag = false;
-        battleRdy = false;
-        battleSet1Flag = false;
-        battleSet2Flag = false;
-        battleSettingFlag = false;
-        [self AttackDisplay];
-        windowPoint.x = [mapWindow frame].origin.x;
-        windowPoint.y = [mapWindow frame].origin.y;
-        [battleWindow setFrameOrigin:windowPoint];
-        [battleWindow makeKeyAndOrderFront:nil];
-        [battlePanel close];
-    }
-    }
-    if(Utarget){
-    if(battleRdy &&
-       ((Utarget && MF[MFselectedRow+1].MS.playerSet1 == 2 && MF[MFselectedRow+1].MS.playerSet2 == 2) ||
-        (unitBreak->team == 2 && Utarget->team == 1) || (unitBreak->team == 1 && Utarget->team == 2) ||
-        (unitBreak->team == 1 && Utarget->team == 1) || (unitBreak->team == 2 && Utarget->team == 2)
-        )
-       ){
         
-        if(!(AVpreview.rate > 0) && !animationFlag1 && !animationFlag2)
-            oopsCnt--;
-        if(oopsCnt > 0)
-            return;
-        else{
-            oopsCnt = 30;//cpu攻撃準備
-        }
         
-       bLoopFlag = false;
-    }
+        MF[MFselectedRow+1].MS.D = MS.D;
+        cpuTurnEndFlag = false;
+        battleSetUpIgnore = false;
+        pussyCumsOnlyOnceFlag = true;
+        wtRdy = false;
     }
-    U = UTop;
-    
+
 
 }
 
@@ -2741,6 +2765,13 @@ w000p:
     [CResearchListMA removeAllObjects];
     [self didChangeValueForKey:@"CResearchListMA"];
     
+    [researchATK setStringValue:[NSString stringWithFormat:@"攻撃力 ----"]];
+    [researchDEF setStringValue:[NSString stringWithFormat:@"防御力 ----"]];
+    [researchCAP setStringValue:[NSString stringWithFormat:@"演算力 ----"]];
+    [researchACU setStringValue:[NSString stringWithFormat:@"命中値 ----"]];
+    [researchEVA setStringValue:[NSString stringWithFormat:@"回避値 ----"]];
+    [researchMOV setStringValue:[NSString stringWithFormat:@"移動力 ----"]];
+    
     BUILDCHIP *B0;
     
     B = BTop;
@@ -2761,6 +2792,7 @@ w000p:
         
         if(GCnum1 < 0)
         if(!B0->R){
+
         return false;
     
         }
@@ -2769,10 +2801,12 @@ w000p:
     
         if(GCnum2 < 0)
         if(!B0->R){
+
             return false;
             
         }
     }
+    
     while(B0->R){
         BU = B0->R->U;
         
@@ -2798,6 +2832,7 @@ w000p:
     
     B = &BC[buildNum[possionX][possionY]];
     
+    
     if(B0->R){
     Rtop = B->R;
     
@@ -2846,7 +2881,7 @@ w000p:
             if(!guildRE1){
                 n = [self chooseGuildList:GuildChosen1 gcnum:GCnum1];
             if(n == -1)
-                break;
+                return false;
                 *(GuildDisp1 + i) = *(GuildChosen1 + n);
             }
         
@@ -2865,11 +2900,12 @@ w000p:
             [self didChangeValueForKey:@"CResearchListMA"];
     
         }
-        
+
         
         
         int k = 0;
         B->R = Rtop;
+        
         while (B->R) {
             B->R = B->R->next;
             k++;
@@ -2912,7 +2948,7 @@ w000p:
             if(!guildRE2){
                 n = [self chooseGuildList:GuildChosen2 gcnum:GCnum2];
                 if(n == -1)
-                    break;
+                    return false;
                 *(GuildDisp2 + i) = *(GuildChosen2 + n);
             }
             
@@ -3103,6 +3139,7 @@ w000p:
     U = UTop;
     
     wtRdy = false;
+    wtRdy2 = false;
     pushStanbyFlag = true;
     pussyLoopFlag = false;
     [menuPanel close];
@@ -6699,7 +6736,10 @@ w000p:
             break;
         case 3:
             if(bLoopFlag) break;
-            if(cpuAImodeflag && !cpuTurnEndFlag) wtRdy = false;
+            if(cpuAImodeflag && !cpuTurnEndFlag) {
+                wtRdy = false;
+            wtRdy2 = false;
+            }
             battleSetUp = false;
             battleSetFlag = false;
             battleFlag = false;
@@ -11662,6 +11702,18 @@ SKIP1:
     }
     }
     
+    if(P[0].resource < 0) P[0].resource = 0;
+    if(P[1].resource < 0) P[1].resource = 0;
+    if(P[2].resource < 0) P[2].resource = 0;
+    
+    if(P[0].food < 0) P[0].food = 0;
+    if(P[1].food < 0) P[1].food = 0;
+    if(P[2].food < 0) P[2].food = 0;
+    
+    if(P[0].money < 0) P[0].money = 0;
+    if(P[1].money < 0) P[1].money = 0;
+    if(P[2].money < 0) P[2].money = 0;
+    
     MS0->succeessfulFlag = true;
     MS0->endFlag = true;
     return MS0;
index 769d15a..16b99de 100755 (executable)
             unitNum[unitBreak->x][unitBreak->y] = -1;
             unitBreak->C.S_C.WT = 999999;
             wtRdy = false;
+            wtRdy2 = false;
             stanbyFlag = true;
         }
         
                 return;
             
             wtRdy = true;
+            wtRdy2 = true;
             unitMoveEndFlag = false;
             cpuAtkExtendFlag = false;
             cpuAtkExtendFlag2 = false;
                 
                 
                 wtRdy = false;
+                wtRdy2 = false;
                 pushStanbyFlag = true;
                 
 
             
             
             wtRdy = true;
+            wtRdy2 = true;
             
             pushStanbyFlag = true;
             
                                 break;
                             j++;
                         }
+                        if(n == -1)
+                            break;
                         
-                        j = arc4random()%(j+1);
+                        j = arc4random()%(j);
                         
                         BRUindex = 0;
                         for (int i = 0; UC[*(GuildDisp1 + j - k)-1].nameID != UC[i].nameID && i < UCN;i++) {
                             
                             if(*(GuildDisp2 + i) <= 0)
                                 break;
+                            j++;
                         }
+                        if(n == -1)
+                            break;
                         
-                        
-                        j = arc4random()%(j+1);
+                        j = arc4random()%(j);
                         
                         BRUindex = 0;
                         for (int i = 0; UC[*(GuildDisp2 + j - k)-1].nameID != UC[i].nameID && i < UCN;i++) {
index afe89e8..03b2082 100644 (file)
@@ -925,8 +925,35 @@ NSTimer *timeMapEditor;
     IBOutlet NSButtonCell *eventGuildBC1;
     IBOutlet NSButtonCell *eventGuildBC2;
     IBOutlet NSButton *eventGuildBTN;
+    
+    
+    IBOutlet NSWindow *EDhpFixWindow;
+    
+    IBOutlet NSButtonCell *EDhpFixBC1;
+    IBOutlet NSButtonCell *EDhpFixBC2;
+    IBOutlet NSButtonCell *EDhpFixBC3;
+    IBOutlet NSButtonCell *EDhpFixBC4;
+    IBOutlet NSTextField *EDhpFixTF1;
+    IBOutlet NSTextField *EDhpFixTF2;
+    IBOutlet NSButton *EDhpFixBtn;
+    
+    NSMutableArray *EDhpFixListMA1;
+    IBOutlet NSArrayController *EDhpFixListAC1;
+    IBOutlet NSTableView *EDhpFixListTV1;
+    NSMutableArray *EDhpFixListMA2;
+    IBOutlet NSArrayController *EDhpFixListAC2;
+    IBOutlet NSTableView *EDhpFixListTV2;
+    NSMutableArray *EDhpFixListMA3;
+    IBOutlet NSArrayController *EDhpFixListAC3;
+    IBOutlet NSTableView *EDhpFixListTV3;
+    
+    
 }
 
+-(IBAction)EDhpFixPlace:(id)sender;
+-(IBAction)EDhpFixValue:(id)sender;
+-(IBAction)EDhpFixSubmit:(id)sender;
+-(IBAction)EDhpFixCancel:(id)sender;
 
 -(IBAction)eventGuildBtnCell:(id)sender;
 -(IBAction)eventGuildBtn:(id)sender;
index 778baa4..698ebb5 100755 (executable)
                 <outlet property="EDhpButton2" destination="IpT-zY-MX0" id="rCQ-45-Xmp"/>
                 <outlet property="EDhpButtonA" destination="rjz-AR-FVH" id="cuc-lK-45X"/>
                 <outlet property="EDhpButtonB" destination="Odu-zf-LmK" id="DLC-8T-OYT"/>
+                <outlet property="EDhpFixBC1" destination="sAh-4s-c7q" id="jRQ-Q9-s5x"/>
+                <outlet property="EDhpFixBC2" destination="5nD-Bx-qDN" id="ZAx-FK-cmb"/>
+                <outlet property="EDhpFixBC3" destination="Ijz-cu-f3S" id="SOF-cc-9JW"/>
+                <outlet property="EDhpFixBC4" destination="Icb-Oh-VWj" id="u15-f9-uTH"/>
+                <outlet property="EDhpFixBtn" destination="7zW-NF-uwH" id="dnO-kp-Cau"/>
+                <outlet property="EDhpFixListAC1" destination="4OI-TZ-1oL" id="H7T-N0-hlu"/>
+                <outlet property="EDhpFixListAC2" destination="qqa-eS-eeY" id="RE8-EM-wKa"/>
+                <outlet property="EDhpFixListAC3" destination="lrw-EV-jZ9" id="p0Y-dB-hyT"/>
+                <outlet property="EDhpFixListTV1" destination="Xwe-1P-CYg" id="VaR-Sy-Axh"/>
+                <outlet property="EDhpFixListTV2" destination="ItL-HP-xDF" id="2tn-WN-SmB"/>
+                <outlet property="EDhpFixListTV3" destination="VcZ-Do-tDa" id="cCw-7A-vC7"/>
+                <outlet property="EDhpFixTF1" destination="Y5V-Km-m9A" id="IRV-d0-HZh"/>
+                <outlet property="EDhpFixTF2" destination="JQU-Mq-kI8" id="Cha-Je-eBb"/>
+                <outlet property="EDhpFixWindow" destination="Gbh-BZ-Ivd" id="6l0-ki-02T"/>
                 <outlet property="EDhpTF" destination="Y5V-Km-m9A" id="BCV-Gg-R6j"/>
                 <outlet property="EDlabelJumpTF" destination="mxc-bZ-L3I" id="k98-no-Ap6"/>
                 <outlet property="EDlabelJumpWindow" destination="hR9-Tc-lNv" id="Hdy-G0-hQQ"/>
                 <outlet property="levelWindow" destination="N2U-Rv-jyJ" id="3TT-Jv-15v"/>
             </connections>
         </customObject>
+        <arrayController id="4OI-TZ-1oL" userLabel="EDhpFixListAC1">
+            <connections>
+                <binding destination="3826" name="contentArray" keyPath="EDhpFixListMA1" id="7Ez-Fh-bTk"/>
+            </connections>
+        </arrayController>
+        <arrayController id="qqa-eS-eeY" userLabel="EDhpFixListAC2">
+            <connections>
+                <binding destination="3826" name="contentArray" keyPath="EDhpFixListMA2" id="fGI-5j-zrV"/>
+            </connections>
+        </arrayController>
+        <arrayController id="lrw-EV-jZ9" userLabel="EDhpFixListAC3">
+            <connections>
+                <binding destination="3826" name="contentArray" keyPath="EDhpFixListMA3" id="YPb-Zd-AHi"/>
+            </connections>
+        </arrayController>
         <arrayController id="Efj-F8-NdQ" userLabel="eventGuildListAC">
             <connections>
                 <binding destination="3826" name="contentArray" keyPath="eventGuildListMA" id="SFi-tR-3G6"/>
                             <font key="font" size="13" name="AquaKana"/>
                         </buttonCell>
                         <connections>
-                            <action selector="EDhpSubmit:" target="3826" id="IeD-rf-tKL"/>
+                            <action selector="EDhpFixSubmit:" target="3826" id="Sv5-Ct-b72"/>
                         </connections>
                     </button>
                     <button verticalHuggingPriority="750" id="zy5-hH-BIG">
                             <font key="font" size="13" name="AquaKana"/>
                         </buttonCell>
                         <connections>
-                            <action selector="EDhpCancel:" target="3826" id="QUb-b4-Lwk"/>
+                            <action selector="EDhpFixCancel:" target="3826" id="0Ha-iU-wEl"/>
                         </connections>
                     </button>
                     <scrollView autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" id="juQ-ob-MCO">
                                             </textFieldCell>
                                             <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
                                             <connections>
-                                                <binding destination="fEW-Dh-30u" name="value" keyPath="arrangedObjects.name" id="dPA-uY-9Pu">
+                                                <binding destination="qqa-eS-eeY" name="value" keyPath="arrangedObjects" id="alH-sa-hGT">
                                                     <dictionary key="options">
                                                         <bool key="NSCreatesSortDescriptor" value="NO"/>
                                                     </dictionary>
                         </textFieldCell>
                     </textField>
                     <textField verticalHuggingPriority="750" id="Y5V-Km-m9A">
-                        <rect key="frame" x="89" y="378" width="96" height="22"/>
+                        <rect key="frame" x="89" y="358" width="96" height="22"/>
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
                         <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="6Bq-xs-mWC">
                             <font key="font" metaFont="system"/>
                         </textFieldCell>
                     </textField>
                     <matrix verticalHuggingPriority="750" allowsEmptySelection="NO" autorecalculatesCellSize="YES" id="pDq-36-jdA">
-                        <rect key="frame" x="20" y="313" width="61" height="100"/>
+                        <rect key="frame" x="23" y="334" width="61" height="38"/>
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
                         <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
                         <size key="cellSize" width="48" height="18"/>
                         </cells>
                     </matrix>
                     <scrollView autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" id="HJA-Lo-Spx">
-                        <rect key="frame" x="23" y="67" width="307" height="220"/>
+                        <rect key="frame" x="22" y="179" width="307" height="83"/>
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
                         <clipView key="contentView" id="rz9-f6-LdL">
-                            <rect key="frame" x="1" y="1" width="305" height="218"/>
+                            <rect key="frame" x="1" y="1" width="305" height="81"/>
                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                             <subviews>
                                 <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnReordering="NO" columnSelection="YES" columnResizing="NO" multipleSelection="NO" autosaveColumns="NO" id="ItL-HP-xDF">
                                             </textFieldCell>
                                             <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
                                             <connections>
-                                                <binding destination="3IQ-ze-3zY" name="value" keyPath="arrangedObjects.name" id="JZW-fM-mT9"/>
+                                                <binding destination="qqa-eS-eeY" name="value" keyPath="arrangedObjects.name" id="a8k-Y4-GiY"/>
                                             </connections>
                                         </tableColumn>
                                     </tableColumns>
                             <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
                         </textFieldCell>
                     </textField>
+                    <button verticalHuggingPriority="750" id="RdE-bD-uvW">
+                        <rect key="frame" x="17" y="265" width="92" height="32"/>
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                        <buttonCell key="cell" type="push" title="場所指定" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="X8r-fB-YDh">
+                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                            <font key="font" size="13" name="HiraKakuProN-W3"/>
+                        </buttonCell>
+                        <connections>
+                            <action selector="EDhpFixPlace:" target="3826" id="XNx-91-f6D"/>
+                        </connections>
+                    </button>
+                    <button verticalHuggingPriority="750" id="pdR-Ff-SAb">
+                        <rect key="frame" x="16" y="141" width="92" height="32"/>
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                        <buttonCell key="cell" type="push" title="変数指定" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="vLA-54-Uyp">
+                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                            <font key="font" size="13" name="HiraKakuProN-W3"/>
+                        </buttonCell>
+                        <connections>
+                            <action selector="EDhpFixValue:" target="3826" id="IKJ-rj-FnK"/>
+                        </connections>
+                    </button>
+                    <button id="7zW-NF-uwH">
+                        <rect key="frame" x="18" y="21" width="87" height="18"/>
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                        <buttonCell key="cell" type="check" title="チーム全体" bezelStyle="regularSquare" imagePosition="left" inset="2" id="8Sw-TG-jk9">
+                            <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
+                            <font key="font" size="13" name="HiraKakuProN-W3"/>
+                        </buttonCell>
+                    </button>
+                    <textField verticalHuggingPriority="750" id="JQU-Mq-kI8">
+                        <rect key="frame" x="115" y="15" width="44" height="22"/>
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="hPT-11-CgU">
+                            <font key="font" metaFont="system"/>
+                            <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
+                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                        </textFieldCell>
+                    </textField>
+                    <scrollView autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" id="If1-kU-VHj">
+                        <rect key="frame" x="23" y="55" width="307" height="83"/>
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                        <clipView key="contentView" id="CMT-Nu-Hcw">
+                            <rect key="frame" x="1" y="1" width="305" height="81"/>
+                            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                            <subviews>
+                                <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnReordering="NO" columnSelection="YES" columnResizing="NO" multipleSelection="NO" autosaveColumns="NO" id="VcZ-Do-tDa">
+                                    <rect key="frame" x="0.0" y="0.0" width="305" height="19"/>
+                                    <autoresizingMask key="autoresizingMask"/>
+                                    <size key="intercellSpacing" width="3" height="2"/>
+                                    <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                    <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
+                                    <tableColumns>
+                                        <tableColumn width="302" minWidth="40" maxWidth="1000" id="cOo-9E-aZl">
+                                            <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left">
+                                                <font key="font" metaFont="smallSystem"/>
+                                                <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
+                                                <color key="backgroundColor" white="0.33333298560000002" alpha="1" colorSpace="calibratedWhite"/>
+                                            </tableHeaderCell>
+                                            <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" title="Text Cell" id="NqA-5F-Fkw">
+                                                <font key="font" metaFont="system"/>
+                                                <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                                                <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                            </textFieldCell>
+                                            <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
+                                            <connections>
+                                                <binding destination="lrw-EV-jZ9" name="value" keyPath="arrangedObjects.name" id="KQK-Xa-IPg"/>
+                                            </connections>
+                                        </tableColumn>
+                                    </tableColumns>
+                                </tableView>
+                            </subviews>
+                            <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+                        </clipView>
+                        <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="P8M-2f-hUN">
+                            <rect key="frame" x="1" y="119" width="223" height="15"/>
+                            <autoresizingMask key="autoresizingMask"/>
+                        </scroller>
+                        <scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="oTX-Bi-JfR">
+                            <rect key="frame" x="224" y="17" width="15" height="102"/>
+                            <autoresizingMask key="autoresizingMask"/>
+                        </scroller>
+                    </scrollView>
                 </subviews>
             </view>
         </window>