OSDN Git Service

UIを調整
[kcd/KCD.git] / KCD / HMCombinedBattleCommand.m
1 //
2 //  HMCombinedBattleCommand.m
3 //  KCD
4 //
5 //  Created by Hori,Masaki on 2014/08/16.
6 //  Copyright (c) 2014年 Hori,Masaki. All rights reserved.
7 //
8
9 #import "HMCombinedBattleCommand.h"
10
11 #import "HMCalculateDamageCommand.h"
12 #import "HMDropShipHistoryCommand.h"
13 #import "HMGuardShelterCommand.h"
14
15
16 @implementation HMCombinedBattleCommand
17 + (void)load
18 {
19         static dispatch_once_t onceToken;
20         dispatch_once(&onceToken, ^{
21                 [HMJSONCommand registerClass:self];
22         });
23 }
24
25 + (BOOL)canExcuteAPI:(NSString *)api
26 {
27         if([api isEqualToString:@"/kcsapi/api_req_combined_battle/battle"]) return YES;
28         if([api isEqualToString:@"/kcsapi/api_req_combined_battle/airbattle"]) return YES;
29         if([api isEqualToString:@"/kcsapi/api_req_combined_battle/battle_water"]) return YES;
30         if([api isEqualToString:@"/kcsapi/api_req_combined_battle/midnight_battle"]) return YES;
31         if([api isEqualToString:@"/kcsapi/api_req_combined_battle/sp_midnight"]) return YES;
32         if([api isEqualToString:@"/kcsapi/api_req_combined_battle/battleresult"]) return YES;
33         
34         return NO;
35 }
36
37 - (id)init
38 {
39         self = [super initWithCommands:
40                         [HMDropShipHistoryCommand new],
41                         [HMCalculateDamageCommand new],
42                         [HMGuardShelterCommand new],
43                         nil];
44         return self;
45 }
46 @end