Commit 96a34610 authored by argon.sun's avatar argon.sun

fix

parent 642dbc92
...@@ -2467,15 +2467,32 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3 ...@@ -2467,15 +2467,32 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
pduel->delete_group(targets); pduel->delete_group(targets);
return TRUE; return TRUE;
} }
card_set leave_p, destroying;
for(auto cit = targets->container.begin(); cit != targets->container.end(); ++cit) { for(auto cit = targets->container.begin(); cit != targets->container.end(); ++cit) {
(*cit)->enable_field_effect(FALSE); card* pcard = *cit;
if((pcard->current.location == LOCATION_MZONE) && pcard->is_status(STATUS_BATTLE_DESTROYED) && !(pcard->current.reason & (REASON_DESTROY | REASON_EFFECT))) {
pcard->current.reason |= REASON_DESTROY | REASON_BATTLE;
raise_single_event(pcard, 0, EVENT_DESTROY, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0);
destroying.insert(pcard);
} }
adjust_instant(); if((pcard->current.location & LOCATION_ONFIELD) && !pcard->is_status(STATUS_SUMMON_DISABLED)) {
raise_single_event(pcard, 0, EVENT_LEAVE_FIELD_P, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0);
leave_p.insert(pcard);
}
}
if(leave_p.size())
raise_event(&leave_p, EVENT_LEAVE_FIELD_P, reason_effect, reason, reason_player, 0, 0);
if(destroying.size())
raise_event(&destroying, EVENT_DESTROY, reason_effect, reason, reason_player, 0, 0);
process_single_event();
process_instant_event();
return FALSE; return FALSE;
} }
case 3: { case 3: {
uint32 redirect, dest, redirect_seq; uint32 redirect, dest, redirect_seq;
card_set leave_p, destroying; for(auto cit = targets->container.begin(); cit != targets->container.end(); ++cit)
(*cit)->enable_field_effect(FALSE);
adjust_instant();
for(auto cit = targets->container.begin(); cit != targets->container.end(); ++cit) { for(auto cit = targets->container.begin(); cit != targets->container.end(); ++cit) {
card* pcard = *cit; card* pcard = *cit;
dest = (pcard->operation_param >> 8) & 0xff; dest = (pcard->operation_param >> 8) & 0xff;
...@@ -2501,22 +2518,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3 ...@@ -2501,22 +2518,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
pcard->current.reason |= REASON_REDIRECT; pcard->current.reason |= REASON_REDIRECT;
pcard->operation_param = (pcard->operation_param & 0xffff0000) | (redirect << 8) | redirect_seq; pcard->operation_param = (pcard->operation_param & 0xffff0000) | (redirect << 8) | redirect_seq;
} }
if((pcard->current.location == LOCATION_MZONE) && pcard->is_status(STATUS_BATTLE_DESTROYED) && !(pcard->current.reason & (REASON_DESTROY | REASON_EFFECT))) {
pcard->current.reason |= REASON_DESTROY | REASON_BATTLE;
raise_single_event(pcard, 0, EVENT_DESTROY, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0);
destroying.insert(pcard);
} }
if((pcard->current.location & LOCATION_ONFIELD) && !pcard->is_status(STATUS_SUMMON_DISABLED)) {
raise_single_event(pcard, 0, EVENT_LEAVE_FIELD_P, pcard->current.reason_effect, pcard->current.reason, pcard->current.reason_player, 0, 0);
leave_p.insert(pcard);
}
}
if(leave_p.size())
raise_event(&leave_p, EVENT_LEAVE_FIELD_P, reason_effect, reason, reason_player, 0, 0);
if(destroying.size())
raise_event(&destroying, EVENT_DESTROY, reason_effect, reason, reason_player, 0, 0);
process_single_event();
process_instant_event();
return FALSE; return FALSE;
} }
case 4: { case 4: {
......
...@@ -16,10 +16,10 @@ function c14731897.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,10 +16,10 @@ function c14731897.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end end
function c14731897.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c14731897.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c14731897.activate(e,tp,eg,ep,ev,re,r,rp) function c14731897.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -39,7 +39,7 @@ function c27782503.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +39,7 @@ function c27782503.desop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c27782503.repfilter(c) function c27782503.repfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED)
end end
function c27782503.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c27782503.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -48,13 +48,14 @@ function c27782503.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -48,13 +48,14 @@ function c27782503.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.SelectYesNo(tp,aux.Stringid(27782503,1)) then if Duel.SelectYesNo(tp,aux.Stringid(27782503,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local g=Duel.SelectMatchingCard(tp,c27782503.repfilter,tp,LOCATION_MZONE,0,1,1,c) local g=Duel.SelectMatchingCard(tp,c27782503.repfilter,tp,LOCATION_MZONE,0,1,1,c)
Duel.SetTargetCard(g) e:SetLabelObject(g:GetFirst())
Duel.HintSelection(g)
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true) g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true)
return true return true
else return false end else return false end
end end
function c27782503.desrepop(e,tp,eg,ep,ev,re,r,rp) function c27782503.desrepop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tc=e:GetLabelObject()
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,false) tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(g,REASON_EFFECT+REASON_REPLACE) Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
end end
...@@ -44,7 +44,7 @@ function c29981921.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,7 +44,7 @@ function c29981921.disop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c29981921.repfilter(c) function c29981921.repfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED)
end end
function c29981921.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c29981921.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -53,13 +53,14 @@ function c29981921.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -53,13 +53,14 @@ function c29981921.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.SelectYesNo(tp,aux.Stringid(29981921,1)) then if Duel.SelectYesNo(tp,aux.Stringid(29981921,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local g=Duel.SelectMatchingCard(tp,c29981921.repfilter,tp,LOCATION_MZONE,0,1,1,c) local g=Duel.SelectMatchingCard(tp,c29981921.repfilter,tp,LOCATION_MZONE,0,1,1,c)
Duel.SetTargetCard(g) e:SetLabelObject(g:GetFirst())
Duel.HintSelection(g)
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true) g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true)
return true return true
else return false end else return false end
end end
function c29981921.desrepop(e,tp,eg,ep,ev,re,r,rp) function c29981921.desrepop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tc=e:GetLabelObject()
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,false) tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(g,REASON_EFFECT+REASON_REPLACE) Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
end end
...@@ -24,7 +24,7 @@ function c31904181.dircon(e) ...@@ -24,7 +24,7 @@ function c31904181.dircon(e)
return Duel.IsExistingMatchingCard(c31904181.cfilter,e:GetHandler():GetControler(),LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c31904181.cfilter,e:GetHandler():GetControler(),LOCATION_MZONE,0,1,nil)
end end
function c31904181.repfilter(c) function c31904181.repfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED)
end end
function c31904181.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c31904181.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -33,13 +33,14 @@ function c31904181.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -33,13 +33,14 @@ function c31904181.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.SelectYesNo(tp,aux.Stringid(31904181,0)) then if Duel.SelectYesNo(tp,aux.Stringid(31904181,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local g=Duel.SelectMatchingCard(tp,c31904181.repfilter,tp,LOCATION_MZONE,0,1,1,c) local g=Duel.SelectMatchingCard(tp,c31904181.repfilter,tp,LOCATION_MZONE,0,1,1,c)
Duel.SetTargetCard(g) e:SetLabelObject(g:GetFirst())
Duel.HintSelection(g)
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true) g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true)
return true return true
else return false end else return false end
end end
function c31904181.desrepop(e,tp,eg,ep,ev,re,r,rp) function c31904181.desrepop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tc=e:GetLabelObject()
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,false) tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(g,REASON_EFFECT+REASON_REPLACE) Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
end end
...@@ -17,8 +17,9 @@ function c39829561.initial_effect(c) ...@@ -17,8 +17,9 @@ function c39829561.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TO_GRAVE_REDIRECT) e2:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCondition(c39829561.recon) e2:SetCondition(c39829561.recon)
e2:SetValue(c39829561.reval) e2:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c39829561.filter(c) function c39829561.filter(c)
...@@ -37,15 +38,7 @@ function c39829561.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,15 +38,7 @@ function c39829561.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c39829561.recon(e) function c39829561.recon(e)
return e:GetHandler():IsLocation(LOCATION_DECK+LOCATION_HAND+LOCATION_ONFIELD) local c=e:GetHandler()
end return (c:IsLocation(LOCATION_MZONE) and c:IsReason(REASON_BATTLE))
function c39829561.reval(e,c,r) or (c:IsLocation(LOCATION_DECK+LOCATION_HAND) and c:IsReason(REASON_EFFECT))
if e:GetHandler():IsOnField() then
if bit.band(r,REASON_BATTLE)~=0 then return LOCATION_REMOVED
else return LOCATION_GRAVE end
else
if bit.band(r,REASON_EFFECT)~=0 then return LOCATION_REMOVED
else return LOCATION_GRAVE end
end
end end
--バハムートシャーク --バハムート·シャーク
function c440556.initial_effect(c) function c440556.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,c440556.xyzfilter,2) aux.AddXyzProcedure(c,c440556.xyzfilter,2)
...@@ -21,15 +21,9 @@ end ...@@ -21,15 +21,9 @@ end
function c440556.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c440556.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end end
function c440556.filter(c,e,tp) function c440556.filter(c,e,tp)
return c:IsRankBelow(3) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRankBelow(3) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp)
end end
function c440556.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c440556.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -38,9 +32,20 @@ function c440556.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -38,9 +32,20 @@ function c440556.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c440556.spop(e,tp,eg,ep,ev,re,r,rp) function c440556.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local c=e:GetHandler()
local g=Duel.SelectMatchingCard(tp,c440556.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local cp=c:GetControler()
Duel.Hint(HINT_SELECTMSG,cp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(cp,c440556.filter,cp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
elseif cp~=tp then
local cg=Duel.GetFieldGroup(cp,LOCATION_EXTRA,0)
Duel.ConfirmCards(cg,tp)
end end
end end
--`ɡ֥쥤` --カード·ブレイカー
function c51047350.initial_effect(c) function c51047350.initial_effect(c)
c:EnableReviveLimit()
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -3,7 +3,7 @@ function c59297550.initial_effect(c) ...@@ -3,7 +3,7 @@ function c59297550.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(59297550,0)) e1:SetDescription(aux.Stringid(59297550,0))
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_NO_TURN_RESET) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_NO_TURN_RESET+EFFECT_FLAG_CHAIN_UNIQUE)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
......
...@@ -50,7 +50,7 @@ function c63176202.spcon(e,c) ...@@ -50,7 +50,7 @@ function c63176202.spcon(e,c)
and Duel.IsExistingMatchingCard(c63176202.spfilter,tp,LOCATION_MZONE,0,2,nil) and Duel.IsExistingMatchingCard(c63176202.spfilter,tp,LOCATION_MZONE,0,2,nil)
end end
function c63176202.repfilter(c) function c63176202.repfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED)
end end
function c63176202.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c63176202.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -59,15 +59,16 @@ function c63176202.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -59,15 +59,16 @@ function c63176202.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.SelectYesNo(tp,aux.Stringid(63176202,0)) then if Duel.SelectYesNo(tp,aux.Stringid(63176202,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local g=Duel.SelectMatchingCard(tp,c63176202.repfilter,tp,LOCATION_MZONE,0,1,1,c) local g=Duel.SelectMatchingCard(tp,c63176202.repfilter,tp,LOCATION_MZONE,0,1,1,c)
Duel.SetTargetCard(g) e:SetLabelObject(g:GetFirst())
Duel.HintSelection(g)
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true) g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true)
return true return true
else return false end else return false end
end end
function c63176202.desrepop(e,tp,eg,ep,ev,re,r,rp) function c63176202.desrepop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tc=e:GetLabelObject()
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,false) tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(g,REASON_EFFECT+REASON_REPLACE) Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
end end
function c63176202.aclimit1(e,tp,eg,ep,ev,re,r,rp) function c63176202.aclimit1(e,tp,eg,ep,ev,re,r,rp)
if ep==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end if ep==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
......
...@@ -56,7 +56,7 @@ function c64398890.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,7 @@ function c64398890.desop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c64398890.repfilter(c) function c64398890.repfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED)
end end
function c64398890.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c64398890.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -65,13 +65,14 @@ function c64398890.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -65,13 +65,14 @@ function c64398890.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.SelectYesNo(tp,aux.Stringid(64398890,1)) then if Duel.SelectYesNo(tp,aux.Stringid(64398890,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local g=Duel.SelectMatchingCard(tp,c64398890.repfilter,tp,LOCATION_MZONE,0,1,1,c) local g=Duel.SelectMatchingCard(tp,c64398890.repfilter,tp,LOCATION_MZONE,0,1,1,c)
Duel.SetTargetCard(g) e:SetLabelObject(g:GetFirst())
Duel.HintSelection(g)
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true) g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true)
return true return true
else return false end else return false end
end end
function c64398890.desrepop(e,tp,eg,ep,ev,re,r,rp) function c64398890.desrepop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tc=e:GetLabelObject()
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,false) tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(g,REASON_EFFECT+REASON_REPLACE) Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
end end
...@@ -23,7 +23,7 @@ function c69025477.dircon(e) ...@@ -23,7 +23,7 @@ function c69025477.dircon(e)
return Duel.IsExistingMatchingCard(c69025477.cfilter,e:GetHandler():GetControler(),LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c69025477.cfilter,e:GetHandler():GetControler(),LOCATION_MZONE,0,1,nil)
end end
function c69025477.repfilter(c) function c69025477.repfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED)
end end
function c69025477.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c69025477.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -32,13 +32,14 @@ function c69025477.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -32,13 +32,14 @@ function c69025477.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.SelectYesNo(tp,aux.Stringid(69025477,0)) then if Duel.SelectYesNo(tp,aux.Stringid(69025477,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local g=Duel.SelectMatchingCard(tp,c69025477.repfilter,tp,LOCATION_MZONE,0,1,1,c) local g=Duel.SelectMatchingCard(tp,c69025477.repfilter,tp,LOCATION_MZONE,0,1,1,c)
Duel.SetTargetCard(g) e:SetLabelObject(g:GetFirst())
Duel.HintSelection(g)
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true) g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true)
return true return true
else return false end else return false end
end end
function c69025477.desrepop(e,tp,eg,ep,ev,re,r,rp) function c69025477.desrepop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tc=e:GetLabelObject()
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,false) tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(g,REASON_EFFECT+REASON_REPLACE) Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
end end
...@@ -56,7 +56,7 @@ function c90397998.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,7 @@ function c90397998.desop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c90397998.repfilter(c) function c90397998.repfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED)
end end
function c90397998.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c90397998.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -65,13 +65,14 @@ function c90397998.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -65,13 +65,14 @@ function c90397998.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.SelectYesNo(tp,aux.Stringid(90397998,1)) then if Duel.SelectYesNo(tp,aux.Stringid(90397998,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local g=Duel.SelectMatchingCard(tp,c90397998.repfilter,tp,LOCATION_MZONE,0,1,1,c) local g=Duel.SelectMatchingCard(tp,c90397998.repfilter,tp,LOCATION_MZONE,0,1,1,c)
Duel.SetTargetCard(g) e:SetLabelObject(g:GetFirst())
Duel.HintSelection(g)
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true) g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true)
return true return true
else return false end else return false end
end end
function c90397998.desrepop(e,tp,eg,ep,ev,re,r,rp) function c90397998.desrepop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tc=e:GetLabelObject()
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,false) tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(g,REASON_EFFECT+REASON_REPLACE) Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
end end
...@@ -39,7 +39,7 @@ function c95519486.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +39,7 @@ function c95519486.desop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c95519486.repfilter(c) function c95519486.repfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED)
end end
function c95519486.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c95519486.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -48,13 +48,14 @@ function c95519486.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -48,13 +48,14 @@ function c95519486.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.SelectYesNo(tp,aux.Stringid(95519486,1)) then if Duel.SelectYesNo(tp,aux.Stringid(95519486,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local g=Duel.SelectMatchingCard(tp,c95519486.repfilter,tp,LOCATION_MZONE,0,1,1,c) local g=Duel.SelectMatchingCard(tp,c95519486.repfilter,tp,LOCATION_MZONE,0,1,1,c)
Duel.SetTargetCard(g) e:SetLabelObject(g:GetFirst())
Duel.HintSelection(g)
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true) g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true)
return true return true
else return false end else return false end
end end
function c95519486.desrepop(e,tp,eg,ep,ev,re,r,rp) function c95519486.desrepop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tc=e:GetLabelObject()
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,false) tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(g,REASON_EFFECT+REASON_REPLACE) Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
end 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