Commit 5a42008b authored by Fluorohydride's avatar Fluorohydride

Merge pull request #366 from VanillaSalt/patch44

fix
parents cf905862 c939c891
...@@ -1527,7 +1527,7 @@ int32 field::is_player_can_discard_deck_as_cost(uint8 playerid, int32 count) { ...@@ -1527,7 +1527,7 @@ int32 field::is_player_can_discard_deck_as_cost(uint8 playerid, int32 count) {
if(is_player_affected_by_effect(playerid, EFFECT_CANNOT_DISCARD_DECK)) if(is_player_affected_by_effect(playerid, EFFECT_CANNOT_DISCARD_DECK))
return FALSE; return FALSE;
if((count == 1) && core.deck_reversed) if((count == 1) && core.deck_reversed)
return (*player[playerid].list_grave.rbegin())->is_capable_cost_to_grave(playerid); return (*player[playerid].list_main.rbegin())->is_capable_cost_to_grave(playerid);
effect_set eset; effect_set eset;
filter_field_effect(EFFECT_TO_GRAVE_REDIRECT, &eset); filter_field_effect(EFFECT_TO_GRAVE_REDIRECT, &eset);
for(int32 i = 0; i < eset.count; ++i) { for(int32 i = 0; i < eset.count; ++i) {
......
...@@ -3155,6 +3155,7 @@ int32 field::change_position(uint16 step, group * targets, effect * reason_effec ...@@ -3155,6 +3155,7 @@ int32 field::change_position(uint16 step, group * targets, effect * reason_effec
case 0: { case 0: {
card_set::iterator cit; card_set::iterator cit;
card_set equipings; card_set equipings;
card_set flips;
card_set pos_changed; card_set pos_changed;
uint8 npos, opos, noflip; uint8 npos, opos, noflip;
card_vector cv; card_vector cv;
...@@ -3193,6 +3194,7 @@ int32 field::change_position(uint16 step, group * targets, effect * reason_effec ...@@ -3193,6 +3194,7 @@ int32 field::change_position(uint16 step, group * targets, effect * reason_effec
pcard->fieldid = infos.field_id++; pcard->fieldid = infos.field_id++;
if(pcard->current.location == LOCATION_MZONE) { if(pcard->current.location == LOCATION_MZONE) {
raise_single_event(pcard, 0, EVENT_FLIP, reason_effect, 0, reason_player, 0, noflip); raise_single_event(pcard, 0, EVENT_FLIP, reason_effect, 0, reason_player, 0, noflip);
flips.insert(pcard);
} }
if(enable) if(enable)
pcard->enable_field_effect(TRUE); pcard->enable_field_effect(TRUE);
...@@ -3229,6 +3231,8 @@ int32 field::change_position(uint16 step, group * targets, effect * reason_effec ...@@ -3229,6 +3231,8 @@ int32 field::change_position(uint16 step, group * targets, effect * reason_effec
} }
adjust_instant(); adjust_instant();
process_single_event(); process_single_event();
if(flips.size())
raise_event(&flips, EVENT_FLIP, reason_effect, 0, reason_player, 0, 0);
if(pos_changed.size()) if(pos_changed.size())
raise_event(&pos_changed, EVENT_CHANGE_POS, reason_effect, 0, reason_player, 0, 0); raise_event(&pos_changed, EVENT_CHANGE_POS, reason_effect, 0, reason_player, 0, 0);
process_instant_event(); process_instant_event();
......
...@@ -15,6 +15,7 @@ function c23015896.initial_effect(c) ...@@ -15,6 +15,7 @@ function c23015896.initial_effect(c)
e2:SetCondition(c23015896.spcon) e2:SetCondition(c23015896.spcon)
e2:SetTarget(c23015896.sptg) e2:SetTarget(c23015896.sptg)
e2:SetOperation(c23015896.spop) e2:SetOperation(c23015896.spop)
e2:SetLabelObject(e1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--destroy --destroy
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -39,13 +40,17 @@ function c23015896.initial_effect(c) ...@@ -39,13 +40,17 @@ function c23015896.initial_effect(c)
end end
function c23015896.spreg(e,tp,eg,ep,ev,re,r,rp) function c23015896.spreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if bit.band(r,0x41)==0x41 then if bit.band(r,0x41)~=0x41 then return end
c:RegisterFlagEffect(23015896,RESET_EVENT+0x1fe0000,0,1) if Duel.GetCurrentPhase()==PHASE_STANDBY then
e:SetLabel(Duel.GetTurnCount())
c:RegisterFlagEffect(23015896,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY,0,2)
else
e:SetLabel(0)
c:RegisterFlagEffect(23015896,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY,0,1)
end end
end end
function c23015896.spcon(e,tp,eg,ep,ev,re,r,rp) function c23015896.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() return e:GetLabelObject():GetLabel()~=Duel.GetTurnCount() and e:GetHandler():GetFlagEffect(23015896)>0
return c:GetTurnID()~=Duel.GetTurnCount() and c:GetFlagEffect(23015896)>0
end end
function c23015896.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c23015896.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -87,9 +87,9 @@ function c24696097.dacon(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,9 +87,9 @@ function c24696097.dacon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():GetControler()~=tp return Duel.GetAttacker():GetControler()~=tp
end end
function c24696097.datg(e,tp,eg,ep,ev,re,r,rp,chk) function c24696097.datg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and e:GetHandler():IsCanBeEffectTarget(e) if chk==0 then return e:GetHandler():IsAbleToRemove() and Duel.GetAttacker():IsCanBeEffectTarget(e)
and not e:GetHandler():IsStatus(STATUS_CHAINING) end and not e:GetHandler():IsStatus(STATUS_CHAINING) end
Duel.SetTargetCard(e:GetHandler()) Duel.SetTargetCard(Duel.GetAttacker())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
end end
function c24696097.daop(e,tp,eg,ep,ev,re,r,rp,chk) function c24696097.daop(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
function c2766877.initial_effect(c) function c2766877.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,aux.XyzFilterFunction(c,2),2) aux.AddXyzProcedure(c,aux.XyzFilterFunction(c,2),2)
c:EnableReviveLimit()
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(2766877,0)) e1:SetDescription(aux.Stringid(2766877,0))
......
...@@ -172,7 +172,7 @@ end ...@@ -172,7 +172,7 @@ end
function c33900648.hdop(e,tp,eg,ep,ev,re,r,rp) function c33900648.hdop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
if bit.band(c33900648[Duel.GetTurnPlayer()],ATTRIBUTE_WATER)==0 then return end if bit.band(c33900648[Duel.GetTurnPlayer()],ATTRIBUTE_WATER)==0 then return end
Duel.DiscardHand(Duel.GetTurnPlayer(),nil,1,1,REASON_EFFECT) Duel.DiscardHand(Duel.GetTurnPlayer(),nil,1,1,REASON_EFFECT+REASON_DISCARD)
end end
function c33900648.damcon(e,tp,eg,ep,ev,re,r,rp) function c33900648.damcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(c33900648[Duel.GetTurnPlayer()],ATTRIBUTE_FIRE)~=0 return bit.band(c33900648[Duel.GetTurnPlayer()],ATTRIBUTE_FIRE)~=0
......
...@@ -74,7 +74,7 @@ function c3429238.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,7 +74,7 @@ function c3429238.rmop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)
if c:IsRelateToEffect(e) and Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)~=0 then if c:IsRelateToEffect(e) and Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)~=0 then
e:GetHandler():RegisterFlagEffect(3429238,RESET_EVENT+0x1fe0000,0,1) e:GetHandler():RegisterFlagEffect(3429238,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1)
end end
end end
end end
......
...@@ -52,7 +52,7 @@ function c38107923.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,7 +52,7 @@ function c38107923.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.SendtoGrave(c,REASON_EFFECT) Duel.SendtoGrave(c,REASON_EFFECT)
c:RegisterFlagEffect(38107923,RESET_EVENT+0x1fe0000,0,1) c:RegisterFlagEffect(38107923,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1)
end end
end end
function c38107923.spcon(e,tp,eg,ep,ev,re,r,rp) function c38107923.spcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -79,7 +79,7 @@ function c50933533.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,7 +79,7 @@ function c50933533.regop(e,tp,eg,ep,ev,re,r,rp)
e1:SetDescription(aux.Stringid(50933533,1)) e1:SetDescription(aux.Stringid(50933533,1))
e1:SetCategory(CATEGORY_DAMAGE) e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetTarget(c50933533.damtg2) e1:SetTarget(c50933533.damtg2)
e1:SetOperation(c50933533.damop) e1:SetOperation(c50933533.damop)
......
...@@ -19,7 +19,7 @@ function c58851034.cfilter(c) ...@@ -19,7 +19,7 @@ function c58851034.cfilter(c)
end end
function c58851034.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c58851034.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c58851034.cfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c58851034.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c58851034.cfilter,1,1,REASON_COST,nil) Duel.DiscardHand(tp,c58851034.cfilter,1,1,REASON_COST+REASON_DISCARD,nil)
end end
function c58851034.target(e,tp,eg,ep,ev,re,r,rp,chk) function c58851034.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -15,6 +15,7 @@ function c61441708.initial_effect(c) ...@@ -15,6 +15,7 @@ function c61441708.initial_effect(c)
e2:SetCondition(c61441708.spcon) e2:SetCondition(c61441708.spcon)
e2:SetTarget(c61441708.sptg) e2:SetTarget(c61441708.sptg)
e2:SetOperation(c61441708.spop) e2:SetOperation(c61441708.spop)
e2:SetLabelObject(e1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--destroy --destroy
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -30,11 +31,17 @@ end ...@@ -30,11 +31,17 @@ end
function c61441708.spr(e,tp,eg,ep,ev,re,r,rp) function c61441708.spr(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if bit.band(r,0x41)~=0x41 or c:IsPreviousLocation(LOCATION_SZONE) then return end if bit.band(r,0x41)~=0x41 or c:IsPreviousLocation(LOCATION_SZONE) then return end
c:RegisterFlagEffect(61441708,RESET_EVENT+0x1fe0000,0,1) if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then
e:SetLabel(Duel.GetTurnCount())
c:RegisterFlagEffect(61441708,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,2)
else
e:SetLabel(0)
c:RegisterFlagEffect(61441708,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1)
end
end end
function c61441708.spcon(e,tp,eg,ep,ev,re,r,rp) function c61441708.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetTurnID()~=Duel.GetTurnCount() and tp==Duel.GetTurnPlayer() and c:GetFlagEffect(61441708)>0 return e:GetLabelObject():GetLabel()~=Duel.GetTurnCount() and tp==Duel.GetTurnPlayer() and c:GetFlagEffect(61441708)>0
end end
function c61441708.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c61441708.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -23,6 +23,7 @@ function c62953041.initial_effect(c) ...@@ -23,6 +23,7 @@ function c62953041.initial_effect(c)
e2:SetCondition(c62953041.spcon) e2:SetCondition(c62953041.spcon)
e2:SetTarget(c62953041.sptg) e2:SetTarget(c62953041.sptg)
e2:SetOperation(c62953041.spop) e2:SetOperation(c62953041.spop)
e2:SetLabelObject(e1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--only 1 can exists --only 1 can exists
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -56,13 +57,18 @@ function c62953041.hspcon(e,c) ...@@ -56,13 +57,18 @@ function c62953041.hspcon(e,c)
end end
function c62953041.spreg(e,tp,eg,ep,ev,re,r,rp) function c62953041.spreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if bit.band(r,0x41)==0x41 and c:IsPreviousPosition(POS_FACEUP) then if bit.band(r,0x41)~=0x41 or not c:IsPreviousPosition(POS_FACEUP) then return end
c:RegisterFlagEffect(62953041,RESET_EVENT+0x1fe0000,0,1) if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then
e:SetLabel(Duel.GetTurnCount())
c:RegisterFlagEffect(61441708,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,2)
else
e:SetLabel(0)
c:RegisterFlagEffect(61441708,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1)
end end
end end
function c62953041.spcon(e,tp,eg,ep,ev,re,r,rp) function c62953041.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetTurnID()~=Duel.GetTurnCount() and tp==Duel.GetTurnPlayer() and c:GetFlagEffect(62953041)>0 return e:GetLabelObject():GetLabel()~=Duel.GetTurnCount() and tp==Duel.GetTurnPlayer() and c:GetFlagEffect(62953041)>0
end end
function c62953041.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c62953041.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -27,6 +27,7 @@ function c69000994.initial_effect(c) ...@@ -27,6 +27,7 @@ function c69000994.initial_effect(c)
e3:SetCondition(c69000994.thcon) e3:SetCondition(c69000994.thcon)
e3:SetTarget(c69000994.thtg) e3:SetTarget(c69000994.thtg)
e3:SetOperation(c69000994.thop) e3:SetOperation(c69000994.thop)
e3:SetLabelObject(e2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c69000994.cfilter(c,tp) function c69000994.cfilter(c,tp)
...@@ -50,22 +51,25 @@ function c69000994.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,22 +51,25 @@ function c69000994.spop(e,tp,eg,ep,ev,re,r,rp)
end end
function c69000994.threg(e,tp,eg,ep,ev,re,r,rp) function c69000994.threg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if bit.band(r,0x41)==0x41 then if bit.band(r,0x41)~=0x41 then return end
c:RegisterFlagEffect(69000994,RESET_EVENT+0x1fe0000,0,1) if Duel.GetCurrentPhase()==PHASE_STANDBY then
e:SetLabel(Duel.GetTurnCount())
c:RegisterFlagEffect(69000994,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY,0,2)
else
e:SetLabel(0)
c:RegisterFlagEffect(69000994,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY,0,1)
end end
end end
function c69000994.thcon(e,tp,eg,ep,ev,re,r,rp) function c69000994.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() return e:GetLabelObject():GetLabel()~=Duel.GetTurnCount() and e:GetHandler():GetFlagEffect(69000994)>0
return c:GetTurnID()~=Duel.GetTurnCount() and c:GetFlagEffect(69000994)>0
end end
function c69000994.thfilter(c,e,tp) function c69000994.thfilter(c)
return c:IsSetCard(0x81) and c:GetCode()~=69000994 and c:IsAbleToHand() return c:IsSetCard(0x81) and c:GetCode()~=69000994 and c:IsAbleToHand()
end end
function c69000994.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c69000994.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local c=e:GetHandler() Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0) e:GetHandler():ResetFlagEffect(69000994)
c:ResetFlagEffect(69000994)
end end
function c69000994.thop(e,tp,eg,ep,ev,re,r,rp) function c69000994.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
--デビルドーザー --デビルドーザー
function c76039636.initial_effect(c) function c76039636.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
function c82944432.initial_effect(c) function c82944432.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,aux.XyzFilterFunctionF(c,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),4),2) aux.AddXyzProcedure(c,aux.XyzFilterFunctionF(c,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),4),2)
c:EnableReviveLimit()
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(82944432,0)) e1:SetDescription(aux.Stringid(82944432,0))
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
function c88942504.initial_effect(c) function c88942504.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,aux.XyzFilterFunction(c,3),2) aux.AddXyzProcedure(c,aux.XyzFilterFunction(c,3),2)
c:EnableReviveLimit()
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(88942504,0)) e1:SetDescription(aux.Stringid(88942504,0))
......
...@@ -46,7 +46,7 @@ end ...@@ -46,7 +46,7 @@ end
function c96594609.tgcon(e,tp,eg,ep,ev,re,r,rp) function c96594609.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY) return e:GetHandler():IsReason(REASON_DESTROY)
end end
function c96594609.tgfilter(c,e,tp) function c96594609.tgfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToGrave() return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToGrave()
end end
function c96594609.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function c96594609.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -137,9 +137,9 @@ function c97489701.nacon(e,tp,eg,ep,ev,re,r,rp) ...@@ -137,9 +137,9 @@ function c97489701.nacon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():GetControler()~=tp return Duel.GetAttacker():GetControler()~=tp
end end
function c97489701.natg(e,tp,eg,ep,ev,re,r,rp,chk) function c97489701.natg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and e:GetHandler():IsCanBeEffectTarget(e) if chk==0 then return e:GetHandler():IsAbleToRemove() and Duel.GetAttacker():IsCanBeEffectTarget(e)
and not e:GetHandler():IsStatus(STATUS_CHAINING) end and not e:GetHandler():IsStatus(STATUS_CHAINING) end
Duel.SetTargetCard(e:GetHandler()) Duel.SetTargetCard(Duel.GetAttacker())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
end end
function c97489701.naop(e,tp,eg,ep,ev,re,r,rp,chk) function c97489701.naop(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -37,7 +37,7 @@ function c97811903.reptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -37,7 +37,7 @@ function c97811903.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp if chk==0 then return not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp
and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end
if Duel.SelectYesNo(tp,aux.Stringid(97811903,0)) then if Duel.SelectYesNo(tp,aux.Stringid(97811903,0)) then
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT) Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
return true return true
else return false end else return false end
end end
...@@ -47,7 +47,7 @@ function c98502113.discon(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,7 +47,7 @@ function c98502113.discon(e,tp,eg,ep,ev,re,r,rp)
end end
function c98502113.discost(e,tp,eg,ep,ev,re,r,rp,chk) function c98502113.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST,nil) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil)
end end
function c98502113.distg(e,tp,eg,ep,ev,re,r,rp,chk) function c98502113.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
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