Commit c11cf2cb authored by DailyShana's avatar DailyShana

update disable (extra) deck effect

Divine Wrath can disable it but not destroy it
parent e401dfa4
......@@ -4135,15 +4135,7 @@ int32 scriptlib::duel_is_player_can_additional_summon(lua_State * L) {
}
int32 scriptlib::duel_is_chain_negatable(lua_State * L) {
check_param_count(L, 1);
int32 chaincount = (int32)lua_tointeger(L, 1);
duel* pduel = interpreter::get_duel_info(L);
chain* ch = pduel->game_field->get_chain(chaincount);
if(!ch)
return 0;
if(ch->triggering_location == LOCATION_DECK)
lua_pushboolean(L, 0);
else
lua_pushboolean(L, 1);
lua_pushboolean(L, 1);
return 1;
}
int32 scriptlib::duel_is_chain_disablable(lua_State * L) {
......@@ -4154,13 +4146,7 @@ int32 scriptlib::duel_is_chain_disablable(lua_State * L) {
lua_pushboolean(L, pduel->game_field->is_chain_disablable(chaincount));
return 1;
}
chain* ch = pduel->game_field->get_chain(chaincount);
if(!ch)
return 0;
if(ch->triggering_location == LOCATION_DECK)
lua_pushboolean(L, 0);
else
lua_pushboolean(L, 1);
lua_pushboolean(L, 1);
return 1;
}
int32 scriptlib::duel_check_chain_target(lua_State *L) {
......
......@@ -29,8 +29,8 @@ int32 field::negate_chain(uint8 chaincount) {
}
pduel->write_buffer8(MSG_CHAIN_NEGATED);
pduel->write_buffer8(chaincount);
if(pchain.triggering_location == LOCATION_DECK)
return FALSE;
if(pchain.triggering_location & (LOCATION_DECK | LOCATION_EXTRA))
pchain.triggering_effect->handler->release_relation(pchain);
return TRUE;
}
return FALSE;
......@@ -48,8 +48,8 @@ int32 field::disable_chain(uint8 chaincount) {
core.current_chain[chaincount - 1].disable_player = core.reason_player;
pduel->write_buffer8(MSG_CHAIN_DISABLED);
pduel->write_buffer8(chaincount);
if(pchain.triggering_location == LOCATION_DECK)
return FALSE;
if(pchain.triggering_location & (LOCATION_DECK | LOCATION_EXTRA))
pchain.triggering_effect->handler->release_relation(pchain);
return TRUE;
}
return FALSE;
......
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