Commit f6beb90b authored by argon's avatar argon

fix

parent f1542bbf
...@@ -2079,6 +2079,7 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) { ...@@ -2079,6 +2079,7 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
else { else {
core.hint_timing[0] = 0; core.hint_timing[0] = 0;
core.hint_timing[1] = 0; core.hint_timing[1] = 0;
core.delayed_quick.clear();
} }
} }
core.select_chains.clear(); core.select_chains.clear();
......
...@@ -14,19 +14,15 @@ function c1127737.initial_effect(c) ...@@ -14,19 +14,15 @@ function c1127737.initial_effect(c)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c1127737.damcon1) e2:SetCondition(c1127737.damcon1)
e2:SetTarget(c1127737.damtg1) e2:SetTarget(c1127737.damtg1)
e2:SetOperation(c1127737.damop) e2:SetOperation(c1127737.damop1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1127737,0)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_REPEAT)
e2:SetCondition(c1127737.damcon2) e2:SetCondition(c1127737.damcon2)
e2:SetTarget(c1127737.damtg2) e2:SetOperation(c1127737.damop2)
e2:SetOperation(c1127737.damop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c1127737.damcon1(e,tp,eg,ep,ev,re,r,rp) function c1127737.damcon1(e,tp,eg,ep,ev,re,r,rp)
...@@ -38,19 +34,7 @@ function c1127737.damtg1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -38,19 +34,7 @@ function c1127737.damtg1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetParam(500) Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,500) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,500)
end end
function c1127737.cfilter(c) function c1127737.damop1(e,tp,eg,ep,ev,re,r,rp)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function c1127737.damcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c1127737.cfilter,Duel.GetTurnPlayer(),LOCATION_MZONE,0,1,nil)
end
function c1127737.damtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(Duel.GetTurnPlayer())
Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,Duel.GetTurnPlayer(),500)
end
function c1127737.damop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then if e:GetHandler():IsRelateToEffect(e) then
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if not Duel.IsPlayerAffectedByEffect(p,37511832) then if not Duel.IsPlayerAffectedByEffect(p,37511832) then
...@@ -58,3 +42,14 @@ function c1127737.damop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,3 +42,14 @@ function c1127737.damop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c1127737.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function c1127737.damcon2(e,tp,eg,ep,ev,re,r,rp)
local turnp=Duel.GetTurnPlayer()
return not Duel.IsPlayerAffectedByEffect(turnp,37511832) and Duel.IsExistingMatchingCard(c1127737.cfilter,turnp,LOCATION_MZONE,0,1,nil)
end
function c1127737.damop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,36562627)
Duel.Damage(p,d,REASON_EFFECT)
end
...@@ -16,7 +16,7 @@ function c15240238.initial_effect(c) ...@@ -16,7 +16,7 @@ function c15240238.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c15240238.filter(c) function c15240238.filter(c)
return c:IsFaceup() return c:IsFaceup() and c:GetAttack()>0
end end
function c15240238.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c15240238.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c15240238.filter(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c15240238.filter(chkc) end
......
...@@ -13,6 +13,7 @@ function c15667446.initial_effect(c) ...@@ -13,6 +13,7 @@ function c15667446.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c15667446.spcon(e,tp,eg,ep,ev,re,r,rp) function c15667446.spcon(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(e:GetHandler():GetPreviousControler())
return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,0x4040)==0x4040 return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,0x4040)==0x4040
end end
function c15667446.atfilter(c) function c15667446.atfilter(c)
...@@ -21,7 +22,7 @@ end ...@@ -21,7 +22,7 @@ end
function c15667446.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c15667446.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c15667446.atfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c15667446.atfilter(chkc) end
if chk==0 then return true end if chk==0 then return true end
if rp~=tp then if rp~=tp and tp==e:GetLabel() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c15667446.atfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c15667446.atfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end end
......
...@@ -15,7 +15,7 @@ function c2158562.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -15,7 +15,7 @@ function c2158562.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE
end end
function c2158562.filter(c) function c2158562.filter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() return c:IsFaceup() and c:IsType(TYPE_SPELL) and c:IsDestructable()
end end
function c2158562.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c2158562.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -31,7 +31,7 @@ end ...@@ -31,7 +31,7 @@ end
function c31554054.activate(e,tp,eg,ep,ev,re,r,rp) function c31554054.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local at=Duel.GetAttackTarget() local at=Duel.GetAttackTarget()
if at:IsRelateToEffect(e) and Duel.SendtoDeck(at,nil,2,REASON_EFFECT)>0 then if at:IsRelateToEffect(e) and at:IsFaceup() and Duel.SendtoDeck(at,nil,2,REASON_EFFECT)>0 then
Duel.BreakEffect() Duel.BreakEffect()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and c:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and c:IsRelateToEffect(e) then
......
...@@ -12,6 +12,7 @@ function c32619583.initial_effect(c) ...@@ -12,6 +12,7 @@ function c32619583.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c32619583.spcon(e,tp,eg,ep,ev,re,r,rp) function c32619583.spcon(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(e:GetHandler():GetPreviousControler())
return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,0x4040)==0x4040 return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,0x4040)==0x4040
end end
function c32619583.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c32619583.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -20,7 +21,7 @@ function c32619583.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -20,7 +21,7 @@ function c32619583.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c32619583.spop(e,tp,eg,ep,ev,re,r,rp) function c32619583.spop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)>0 if e:GetHandler():IsRelateToEffect(e) and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)>0
and rp~=tp and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>1 then and rp~=tp and tp==e:GetLabel() and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>1 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(1-tp,aux.TRUE,tp,0,LOCATION_HAND,2,2,nil) local g=Duel.SelectMatchingCard(1-tp,aux.TRUE,tp,0,LOCATION_HAND,2,2,nil)
......
...@@ -34,6 +34,7 @@ function c34230233.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -34,6 +34,7 @@ function c34230233.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.SendtoHand(g,nil,REASON_COST) Duel.SendtoHand(g,nil,REASON_COST)
end end
function c34230233.descon(e,tp,eg,ep,ev,re,r,rp) function c34230233.descon(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(e:GetHandler():GetPreviousControler())
return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,0x4040)==0x4040 return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,0x4040)==0x4040
end end
function c34230233.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c34230233.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...@@ -47,7 +48,7 @@ function c34230233.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -47,7 +48,7 @@ function c34230233.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c34230233.desop(e,tp,eg,ep,ev,re,r,rp) function c34230233.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and rp~=tp then if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and rp~=tp and tp==e:GetLabel() then
Duel.BreakEffect() Duel.BreakEffect()
local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND) local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if hg:GetCount()>0 then if hg:GetCount()>0 then
......
...@@ -18,7 +18,7 @@ function c5288597.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -18,7 +18,7 @@ function c5288597.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c5288597.cfilter(c,e,tp) function c5288597.cfilter(c,e,tp)
local lv=c:GetOriginalLevel() local lv=c:GetOriginalLevel()
return lv>0 and c:IsAbleToGraveAsCost() return lv>0 and c:IsFaceup() and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c5288597.spfilter,tp,LOCATION_DECK,0,1,nil,lv+1,c:GetOriginalRace(),c:GetOriginalAttribute(),e,tp) and Duel.IsExistingMatchingCard(c5288597.spfilter,tp,LOCATION_DECK,0,1,nil,lv+1,c:GetOriginalRace(),c:GetOriginalAttribute(),e,tp)
end end
function c5288597.spfilter(c,lv,rc,att,e,tp) function c5288597.spfilter(c,lv,rc,att,e,tp)
...@@ -35,16 +35,16 @@ function c5288597.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -35,16 +35,16 @@ function c5288597.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c5288597.cfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c5288597.cfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
c5288597[0]=tc:GetOriginalLevel()
c5288597[1]=tc:GetOriginalRace()
c5288597[2]=tc:GetOriginalAttribute()
Duel.SendtoGrave(tc,REASON_COST) Duel.SendtoGrave(tc,REASON_COST)
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c5288597.activate(e,tp,eg,ep,ev,re,r,rp) function c5288597.activate(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
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c5288597.spfilter,tp,LOCATION_DECK,0,1,1,nil,c5288597[0]+1,c5288597[1],c5288597[2],e,tp) local g=Duel.SelectMatchingCard(tp,c5288597.spfilter,tp,LOCATION_DECK,0,1,1,nil,tc:GetLevel()+1,tc:GetRace(),tc:GetAttribute(),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)
end end
......
...@@ -11,12 +11,13 @@ function c60228941.initial_effect(c) ...@@ -11,12 +11,13 @@ function c60228941.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c60228941.condition(e,tp,eg,ep,ev,re,r,rp) function c60228941.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetPreviousLocation()==LOCATION_HAND and bit.band(r,0x4040)==0x4040 e:SetLabel(e:GetHandler():GetPreviousControler())
return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,0x4040)==0x4040
end end
function c60228941.target(e,tp,eg,ep,ev,re,r,rp,chk) function c60228941.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
if tp~=rp and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if tp~=rp and tp==e:GetLabel() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c60228941.filter2,tp,0,LOCATION_GRAVE,1,nil,e,tp) and Duel.IsExistingTarget(c60228941.filter2,tp,0,LOCATION_GRAVE,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(60228941,1)) then and Duel.SelectYesNo(tp,aux.Stringid(60228941,1)) then
e:SetProperty(EFFECT_FLAG_CARD_TARGET) e:SetProperty(EFFECT_FLAG_CARD_TARGET)
......
...@@ -38,7 +38,7 @@ function c63883999.filter(c,e,tp) ...@@ -38,7 +38,7 @@ function c63883999.filter(c,e,tp)
and Duel.IsExistingMatchingCard(c63883999.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,nil,lv,e,tp) and Duel.IsExistingMatchingCard(c63883999.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,nil,lv,e,tp)
end end
function c63883999.rfilter(c) function c63883999.rfilter(c)
return c:IsRace(RACE_FIEND) and c:IsAbleToRemove() return c:IsFaceup() and c:IsRace(RACE_FIEND) and c:IsAbleToRemove()
end end
function c63883999.spfilter(c,lv,e,tp) function c63883999.spfilter(c,lv,e,tp)
return c:IsSetCard(0x45) and c:GetLevel()==lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x45) and c:GetLevel()==lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -26,10 +26,22 @@ function c67949763.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -26,10 +26,22 @@ function c67949763.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c67949763.activate(e,tp,eg,ep,ev,re,r,rp) function c67949763.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local atk=tc:GetAttack() if Duel.GetLocationCount(tp,LOCATION_MZONE)>2
if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>2
and Duel.IsPlayerCanSpecialSummonMonster(tp,67949764,0x87,0x4011,atk,0,1,RACE_FIEND,ATTRIBUTE_DARK) then and Duel.IsPlayerCanSpecialSummonMonster(tp,67949764,0x87,0x4011,atk,0,1,RACE_FIEND,ATTRIBUTE_DARK) then
local rfid=tc:GetRealFieldID() local rfid=tc:GetRealFieldID()
local atk=0
local cr=false
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local de=Effect.CreateEffect(e:GetHandler())
de:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
de:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
de:SetCode(EVENT_LEAVE_FIELD)
de:SetOperation(c67949763.desop)
de:SetLabel(rfid)
tc:RegisterEffect(de,true)
atk=tc:GetAttack()
cr=true
end
for i=1,3 do for i=1,3 do
local token=Duel.CreateToken(tp,67949764) local token=Duel.CreateToken(tp,67949764)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
...@@ -46,30 +58,18 @@ function c67949763.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,30 +58,18 @@ function c67949763.activate(e,tp,eg,ep,ev,re,r,rp)
token:RegisterEffect(e2,true) token:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(e:GetHandler()) local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SET_ATTACK_FINAL) e3:SetCode(EFFECT_SET_ATTACK)
e3:SetValue(c67949763.atkval) e3:SetValue(atk)
e3:SetLabelObject(tc) e3:SetLabelObject(tc)
e3:SetReset(RESET_EVENT+0x1fe0000) e3:SetReset(RESET_EVENT+0x1fe0000)
token:RegisterEffect(e3,true) token:RegisterEffect(e3,true)
token:RegisterFlagEffect(67949764,RESET_EVENT+0x1fe0000,0,0,rfid) if cr then
tc:CreateRelation(token,RESET_EVENT+0x1fc0000) token:RegisterFlagEffect(67949764,RESET_EVENT+0x1fe0000,0,0,rfid)
tc:CreateRelation(token,RESET_EVENT+0x1fc0000)
end
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
local de=Effect.CreateEffect(e:GetHandler())
de:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
de:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
de:SetCode(EVENT_LEAVE_FIELD)
de:SetOperation(c67949763.desop)
de:SetLabel(rfid)
tc:RegisterEffect(de,true)
end
end
function c67949763.atkval(e,c)
local rc=e:GetLabelObject()
if rc:IsRelateToCard(c) then
e:SetLabel(rc:GetAttack())
end end
return e:GetLabel()
end end
function c67949763.desfilter(c,rfid) function c67949763.desfilter(c,rfid)
return c:GetFlagEffectLabel(67949764)==rfid return c:GetFlagEffectLabel(67949764)==rfid
......
...@@ -28,7 +28,7 @@ end ...@@ -28,7 +28,7 @@ end
function c72502414.operation(e,tp,eg,ep,ev,re,r,rp) function c72502414.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
Duel.Overlay(tc,Group.FromCards(c)) Duel.Overlay(tc,Group.FromCards(c))
end end
end end
...@@ -12,12 +12,13 @@ function c78004197.initial_effect(c) ...@@ -12,12 +12,13 @@ function c78004197.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c78004197.spcon(e,tp,eg,ep,ev,re,r,rp) function c78004197.spcon(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(e:GetHandler():GetPreviousControler())
return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,0x4040)==0x4040 return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,0x4040)==0x4040
end end
function c78004197.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c78004197.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end
if chk==0 then return true end if chk==0 then return true end
if rp~=tp and Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) if rp~=tp and tp==e:GetLabel() and Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(78004197,1)) then and Duel.SelectYesNo(tp,aux.Stringid(78004197,1)) then
e:SetProperty(EFFECT_FLAG_CARD_TARGET) e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
......
...@@ -13,12 +13,13 @@ function c79126789.initial_effect(c) ...@@ -13,12 +13,13 @@ function c79126789.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c79126789.drcon(e,tp,eg,ep,ev,re,r,rp) function c79126789.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetPreviousLocation()==LOCATION_HAND and bit.band(r,0x4040)==0x4040 e:SetLabel(e:GetHandler():GetPreviousControler())
return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,0x4040)==0x4040
end end
function c79126789.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c79126789.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
if tp==rp then if tp==rp or tp~=e:GetLabel() then
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
else else
......
...@@ -43,5 +43,5 @@ function c89856523.atkfilter(c) ...@@ -43,5 +43,5 @@ function c89856523.atkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function c89856523.atkval(e,c) function c89856523.atkval(e,c)
return Duel.GetMatchingGroupCount(c89856523.atkfilter,e:GetHandler(),LOCATION_ONFIELD,0,nil)*-100 return Duel.GetMatchingGroupCount(c89856523.atkfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,nil)*-100
end end
...@@ -14,7 +14,8 @@ function c93211810.initial_effect(c) ...@@ -14,7 +14,8 @@ function c93211810.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c93211810.condition(e,tp,eg,ep,ev,re,r,rp) function c93211810.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()==tp and ph<PHASE_MAIN2 and (ph~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
end end
function c93211810.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c93211810.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckAttackActivity(tp) end if chk==0 then return not Duel.CheckAttackActivity(tp) end
......
...@@ -82,11 +82,11 @@ function c94973028.descost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -82,11 +82,11 @@ function c94973028.descost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c94973028.desfilter(c) function c94973028.desfilter(c)
return c:IsDestructable() return c:IsDestructable() and c:IsAbleToRemove()
end end
function c94973028.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c94973028.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c94973028.desfilter(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c94973028.desfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c94973028.desfilter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c94973028.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c94973028.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,c94973028.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
......
...@@ -23,6 +23,7 @@ function c99458769.initial_effect(c) ...@@ -23,6 +23,7 @@ function c99458769.initial_effect(c)
end end
function c99458769.spcon(e,tp,eg,ep,ev,re,r,rp) function c99458769.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,0x4040)==0x4040 and rp~=tp return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,0x4040)==0x4040 and rp~=tp
and e:GetHandler():GetPreviousControler()==tp
end end
function c99458769.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c99458769.sptg(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