Commit da337861 authored by DailyShana's avatar DailyShana

format

parent 6385eab8
......@@ -1098,8 +1098,7 @@ int32 card::add_effect(effect* peffect) {
}
}
it = single_effect.insert(std::make_pair(peffect->code, peffect));
}
else if (peffect->type & EFFECT_TYPE_FIELD)
} else if (peffect->type & EFFECT_TYPE_FIELD)
it = field_effect.insert(std::make_pair(peffect->code, peffect));
else if (peffect->type & EFFECT_TYPE_EQUIP) {
it = equip_effect.insert(std::make_pair(peffect->code, peffect));
......@@ -1107,8 +1106,7 @@ int32 card::add_effect(effect* peffect) {
check_target = equiping_target;
else
check_target = 0;
}
else
} else
return 0;
peffect->id = pduel->game_field->infos.field_id++;
peffect->card_type = data.type;
......
......@@ -231,8 +231,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
return FALSE;
if(handler->is_affected_by_effect(EFFECT_CANNOT_TRIGGER))
return FALSE;
}
else if(!(type & EFFECT_TYPE_CONTINUOUS)) {
} else if(!(type & EFFECT_TYPE_CONTINUOUS)) {
if((handler->data.type & TYPE_MONSTER) && (handler->current.location & LOCATION_SZONE)
&& !in_range(handler->current.location, handler->current.sequence))
return FALSE;
......@@ -257,8 +256,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
return FALSE;
if(handler->is_affected_by_effect(EFFECT_CANNOT_TRIGGER))
return FALSE;
}
else {
} else {
if(!is_flag(EFFECT_FLAG_AVAILABLE_BD) && (type & EFFECT_TYPE_FIELD) && handler->is_status(STATUS_BATTLE_DESTROYED))
return FALSE;
if(((type & EFFECT_TYPE_FIELD) || ((type & EFFECT_TYPE_SINGLE) && is_flag(EFFECT_FLAG_SINGLE_RANGE))) && (handler->current.location & LOCATION_ONFIELD)
......@@ -275,8 +273,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
if(handler == owner && !is_flag(EFFECT_FLAG_CANNOT_DISABLE) && handler->is_status(STATUS_DISABLED))
return FALSE;
}
}
else {
} else {
if((get_owner_player() != playerid) && !is_flag(EFFECT_FLAG_BOTH_SIDE))
return FALSE;
}
......
......@@ -1117,12 +1117,10 @@ int32 field::equip(uint16 step, uint8 equip_player, card * equip_card, card * ta
if(equip_card->get_type() & TYPE_TRAP) {
peffect->code = EFFECT_ADD_TYPE;
peffect->value = TYPE_EQUIP;
}
else if(equip_card->data.type & TYPE_UNION) {
} else if(equip_card->data.type & TYPE_UNION) {
peffect->code = EFFECT_CHANGE_TYPE;
peffect->value = TYPE_EQUIP + TYPE_SPELL + TYPE_UNION;
}
else {
} else {
peffect->code = EFFECT_CHANGE_TYPE;
peffect->value = TYPE_EQUIP + TYPE_SPELL;
}
......@@ -3481,8 +3479,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
if(pcard->current.reason & REASON_RETURN) {
retgrave.insert(pcard);
raise_single_event(pcard, 0, EVENT_RETURN_TO_GRAVE, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0);
}
else {
} else {
tograve.insert(pcard);
raise_single_event(pcard, 0, EVENT_TO_GRAVE, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0);
}
......
......@@ -2755,8 +2755,7 @@ int32 field::process_battle_command(uint16 step) {
if(!peffect->value){
infos.phase = PHASE_BATTLE;
add_process(PROCESSOR_PHASE_EVENT, 0, 0, 0, PHASE_BATTLE, 0);
}
else {
} else {
core.hint_timing[infos.turn_player] = 0;
reset_phase(PHASE_BATTLE);
adjust_all();
......@@ -3083,8 +3082,7 @@ int32 field::process_battle_command(uint16 step) {
if(!peffect->value) {
infos.phase = PHASE_BATTLE;
add_process(PROCESSOR_PHASE_EVENT, 0, 0, 0, PHASE_BATTLE, 0);
}
else {
} else {
core.hint_timing[infos.turn_player] = 0;
reset_phase(PHASE_BATTLE);
adjust_all();
......@@ -4514,8 +4512,7 @@ int32 field::solve_continuous(uint16 step, effect * peffect, uint8 triggering_pl
add_process(PROCESSOR_SOLVE_CONTINUOUS, 0, core.delayed_tp.front(), 0, infos.turn_player, 0);
core.delayed_tp.pop_front();
core.delayed_tev.pop_front();
}
else
} else
core.conti_player = 1 - infos.turn_player;
}
if(core.conti_player == 1 - infos.turn_player) {
......@@ -4524,15 +4521,13 @@ int32 field::solve_continuous(uint16 step, effect * peffect, uint8 triggering_pl
add_process(PROCESSOR_SOLVE_CONTINUOUS, 0, core.delayed_ntp.front(), 0, 1 - infos.turn_player, 0);
core.delayed_ntp.pop_front();
core.delayed_ntev.pop_front();
}
else if(core.delayed_tp.size()) {
} else if(core.delayed_tp.size()) {
core.conti_player = infos.turn_player;
core.sub_solving_event.push_back(core.delayed_tev.front());
add_process(PROCESSOR_SOLVE_CONTINUOUS, 0, core.delayed_tp.front(), 0, infos.turn_player, 0);
core.delayed_tp.pop_front();
core.delayed_tev.pop_front();
}
else
} else
core.conti_player = PLAYER_NONE;
}
}
......@@ -4690,15 +4685,13 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
add_process(PROCESSOR_SOLVE_CONTINUOUS, 0, core.delayed_tp.front(), 0, infos.turn_player, 0);
core.delayed_tp.pop_front();
core.delayed_tev.pop_front();
}
else if(core.delayed_ntp.size()) {
} else if(core.delayed_ntp.size()) {
core.conti_player = 1 - infos.turn_player;
core.sub_solving_event.push_back(core.delayed_ntev.front());
add_process(PROCESSOR_SOLVE_CONTINUOUS, 0, core.delayed_ntp.front(), 0, 1 - infos.turn_player, 0);
core.delayed_ntp.pop_front();
core.delayed_ntev.pop_front();
}
else
} else
core.conti_player = PLAYER_NONE;
pduel->write_buffer8(MSG_CHAIN_SOLVED);
pduel->write_buffer8(cait->chain_count);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment