Commit a95bef3a authored by DailyShana's avatar DailyShana

format

parent 72da9d3a
...@@ -3220,7 +3220,7 @@ int32 card::is_affect_by_effect(effect* peffect) { ...@@ -3220,7 +3220,7 @@ int32 card::is_affect_by_effect(effect* peffect) {
int32 card::is_destructable() { int32 card::is_destructable() {
if(overlay_target) if(overlay_target)
return FALSE; return FALSE;
if(current.location & (LOCATION_GRAVE + LOCATION_REMOVED)) if(current.location & (LOCATION_GRAVE | LOCATION_REMOVED))
return FALSE; return FALSE;
return TRUE; return TRUE;
} }
...@@ -3322,7 +3322,7 @@ int32 card::is_releasable_by_summon(uint8 playerid, card *pcard) { ...@@ -3322,7 +3322,7 @@ int32 card::is_releasable_by_summon(uint8 playerid, card *pcard) {
return FALSE; return FALSE;
if(overlay_target) if(overlay_target)
return FALSE; return FALSE;
if(current.location & (LOCATION_GRAVE + LOCATION_REMOVED)) if(current.location & (LOCATION_GRAVE | LOCATION_REMOVED))
return FALSE; return FALSE;
if(!pduel->game_field->is_player_can_release(playerid, this)) if(!pduel->game_field->is_player_can_release(playerid, this))
return FALSE; return FALSE;
...@@ -3337,7 +3337,7 @@ int32 card::is_releasable_by_nonsummon(uint8 playerid) { ...@@ -3337,7 +3337,7 @@ int32 card::is_releasable_by_nonsummon(uint8 playerid) {
return FALSE; return FALSE;
if(overlay_target) if(overlay_target)
return FALSE; return FALSE;
if(current.location & (LOCATION_GRAVE + LOCATION_REMOVED)) if(current.location & (LOCATION_GRAVE | LOCATION_REMOVED))
return FALSE; return FALSE;
if((current.location == LOCATION_HAND) && (data.type & (TYPE_SPELL | TYPE_TRAP))) if((current.location == LOCATION_HAND) && (data.type & (TYPE_SPELL | TYPE_TRAP)))
return FALSE; return FALSE;
......
...@@ -192,7 +192,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con ...@@ -192,7 +192,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
return FALSE; return FALSE;
} }
uint32 zone = 0xff; uint32 zone = 0xff;
if(!(handler->data.type & (TYPE_FIELD+TYPE_PENDULUM)) && is_flag(EFFECT_FLAG_LIMIT_ZONE)) { if(!(handler->data.type & (TYPE_FIELD | TYPE_PENDULUM)) && is_flag(EFFECT_FLAG_LIMIT_ZONE)) {
pduel->lua->add_param(playerid, PARAM_TYPE_INT); pduel->lua->add_param(playerid, PARAM_TYPE_INT);
pduel->lua->add_param(e.event_cards , PARAM_TYPE_GROUP); pduel->lua->add_param(e.event_cards , PARAM_TYPE_GROUP);
pduel->lua->add_param(e.event_player, PARAM_TYPE_INT); pduel->lua->add_param(e.event_player, PARAM_TYPE_INT);
...@@ -213,7 +213,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con ...@@ -213,7 +213,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
if((handler->data.type & TYPE_SPELL) && (handler->data.type & TYPE_QUICKPLAY)) if((handler->data.type & TYPE_SPELL) && (handler->data.type & TYPE_QUICKPLAY))
return FALSE; return FALSE;
} }
if(!(handler->data.type & (TYPE_FIELD+TYPE_PENDULUM)) && is_flag(EFFECT_FLAG_LIMIT_ZONE) && !(zone & (1u << handler->current.sequence))) if(!(handler->data.type & (TYPE_FIELD | TYPE_PENDULUM)) && is_flag(EFFECT_FLAG_LIMIT_ZONE) && !(zone & (1u << handler->current.sequence)))
return FALSE; return FALSE;
} else { } else {
if(handler->data.type & TYPE_MONSTER) { if(handler->data.type & TYPE_MONSTER) {
......
...@@ -47,7 +47,7 @@ int32 scriptlib::debug_add_card(lua_State *L) { ...@@ -47,7 +47,7 @@ int32 scriptlib::debug_add_card(lua_State *L) {
pduel->game_field->add_card(playerid, pcard, location, sequence); pduel->game_field->add_card(playerid, pcard, location, sequence);
} }
pcard->current.position = position; pcard->current.position = position;
if(!(location & (LOCATION_ONFIELD + LOCATION_PZONE)) || (position & POS_FACEUP)) { if(!(location & (LOCATION_ONFIELD | LOCATION_PZONE)) || (position & POS_FACEUP)) {
pcard->enable_field_effect(true); pcard->enable_field_effect(true);
pduel->game_field->adjust_instant(); pduel->game_field->adjust_instant();
} }
......
...@@ -215,11 +215,11 @@ void field::destroy(card_set* targets, effect* reason_effect, uint32 reason, uin ...@@ -215,11 +215,11 @@ void field::destroy(card_set* targets, effect* reason_effect, uint32 reason, uin
pcard->current.reason_player = reason_player; pcard->current.reason_player = reason_player;
} }
uint32 p = playerid; uint32 p = playerid;
if(!(destination & (LOCATION_HAND + LOCATION_DECK + LOCATION_REMOVED))) if(!(destination & (LOCATION_HAND | LOCATION_DECK | LOCATION_REMOVED)))
destination = LOCATION_GRAVE; destination = LOCATION_GRAVE;
if(destination && p == PLAYER_NONE) if(destination && p == PLAYER_NONE)
p = pcard->owner; p = pcard->owner;
if(destination & (LOCATION_GRAVE + LOCATION_REMOVED)) if(destination & (LOCATION_GRAVE | LOCATION_REMOVED))
p = pcard->owner; p = pcard->owner;
pcard->set_status(STATUS_DESTROY_CONFIRMED, TRUE); pcard->set_status(STATUS_DESTROY_CONFIRMED, TRUE);
pcard->sendto_param.set(p, POS_FACEUP, destination, sequence); pcard->sendto_param.set(p, POS_FACEUP, destination, sequence);
...@@ -269,7 +269,7 @@ void field::send_to(card_set* targets, effect* reason_effect, uint32 reason, uin ...@@ -269,7 +269,7 @@ void field::send_to(card_set* targets, effect* reason_effect, uint32 reason, uin
// send to hand from deck and playerid not given => send to the hand of controler // send to hand from deck and playerid not given => send to the hand of controler
if(p == PLAYER_NONE && (destination & LOCATION_HAND) && (pcard->current.location & LOCATION_DECK) && pcard->current.controler == reason_player) if(p == PLAYER_NONE && (destination & LOCATION_HAND) && (pcard->current.location & LOCATION_DECK) && pcard->current.controler == reason_player)
p = reason_player; p = reason_player;
if(destination & (LOCATION_GRAVE + LOCATION_REMOVED) || p == PLAYER_NONE) if(destination & (LOCATION_GRAVE | LOCATION_REMOVED) || p == PLAYER_NONE)
p = pcard->owner; p = pcard->owner;
uint32 pos = position; uint32 pos = position;
if(destination != LOCATION_REMOVED) if(destination != LOCATION_REMOVED)
...@@ -288,7 +288,7 @@ void field::send_to(card* target, effect* reason_effect, uint32 reason, uint32 r ...@@ -288,7 +288,7 @@ void field::send_to(card* target, effect* reason_effect, uint32 reason, uint32 r
send_to(&tset, reason_effect, reason, reason_player, playerid, destination, sequence, position); send_to(&tset, reason_effect, reason, reason_player, playerid, destination, sequence, position);
} }
void field::move_to_field(card* target, uint32 move_player, uint32 playerid, uint32 destination, uint32 positions, uint32 enable, uint32 ret, uint32 is_equip, uint32 zone) { void field::move_to_field(card* target, uint32 move_player, uint32 playerid, uint32 destination, uint32 positions, uint32 enable, uint32 ret, uint32 is_equip, uint32 zone) {
if(!(destination & (LOCATION_MZONE + LOCATION_SZONE)) || !positions) if(!(destination & LOCATION_ONFIELD) || !positions)
return; return;
if(destination == target->current.location && playerid == target->current.controler) if(destination == target->current.location && playerid == target->current.controler)
return; return;
......
...@@ -4230,7 +4230,7 @@ int32 field::add_chain(uint16 step) { ...@@ -4230,7 +4230,7 @@ int32 field::add_chain(uint16 step) {
} }
if(phandler->current.location == LOCATION_HAND) { if(phandler->current.location == LOCATION_HAND) {
uint32 zone = 0xff; uint32 zone = 0xff;
if(!(phandler->data.type & (TYPE_FIELD+TYPE_PENDULUM)) && peffect->is_flag(EFFECT_FLAG_LIMIT_ZONE)) { if(!(phandler->data.type & (TYPE_FIELD | TYPE_PENDULUM)) && peffect->is_flag(EFFECT_FLAG_LIMIT_ZONE)) {
pduel->lua->add_param(clit.triggering_player, PARAM_TYPE_INT); pduel->lua->add_param(clit.triggering_player, PARAM_TYPE_INT);
pduel->lua->add_param(clit.evt.event_cards , PARAM_TYPE_GROUP); pduel->lua->add_param(clit.evt.event_cards , PARAM_TYPE_GROUP);
pduel->lua->add_param(clit.evt.event_player, PARAM_TYPE_INT); pduel->lua->add_param(clit.evt.event_player, PARAM_TYPE_INT);
...@@ -4402,12 +4402,12 @@ int32 field::add_chain(uint16 step) { ...@@ -4402,12 +4402,12 @@ int32 field::add_chain(uint16 step) {
} }
if(peffect->type & EFFECT_TYPE_ACTIVATE) { if(peffect->type & EFFECT_TYPE_ACTIVATE) {
core.leave_confirmed.insert(phandler); core.leave_confirmed.insert(phandler);
if(!(phandler->data.type & (TYPE_CONTINUOUS + TYPE_FIELD + TYPE_EQUIP + TYPE_PENDULUM)) if(!(phandler->data.type & (TYPE_CONTINUOUS | TYPE_FIELD | TYPE_EQUIP | TYPE_PENDULUM))
&& !phandler->is_affected_by_effect(EFFECT_REMAIN_FIELD)) && !phandler->is_affected_by_effect(EFFECT_REMAIN_FIELD))
phandler->set_status(STATUS_LEAVE_CONFIRMED, TRUE); phandler->set_status(STATUS_LEAVE_CONFIRMED, TRUE);
} }
if(phandler->get_type() & (TYPE_SPELL + TYPE_TRAP) if((phandler->get_type() & (TYPE_SPELL | TYPE_TRAP))
&& (phandler->data.type & (TYPE_CONTINUOUS + TYPE_FIELD + TYPE_EQUIP + TYPE_PENDULUM)) && (phandler->data.type & (TYPE_CONTINUOUS | TYPE_FIELD | TYPE_EQUIP | TYPE_PENDULUM))
&& phandler->is_has_relation(clit) && phandler->current.location == LOCATION_SZONE && phandler->is_has_relation(clit) && phandler->current.location == LOCATION_SZONE
&& !peffect->is_flag(EFFECT_FLAG_FIELD_ONLY)) && !peffect->is_flag(EFFECT_FLAG_FIELD_ONLY))
clit.flag |= CHAIN_CONTINUOUS_CARD; clit.flag |= CHAIN_CONTINUOUS_CARD;
......
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