Commit a5305118 authored by VanillaSalt's avatar VanillaSalt

fix

parent f4255a3d
#[2013.9][2013.9 TCG][2013.3.1][2012.9.1][2012.3.1][2011.9.1]
#[2013.9][2013.10.11 TCG][2013.3.1][2012.9.1][2012.3.1][2011.9.1]
!2013.9
#forbidden
20663556 0 --イレカエル
......@@ -153,7 +153,7 @@
53582587 2 --激流葬
29401950 2 --奈落の落とし穴
!2013.9 TCG
!2013.10.11 TCG
#forbidden
20663556 0 --イレカエル
53797637 0 --炎征竜-バーナー
......@@ -285,6 +285,7 @@
94192409 1 --強制脱出装置
53582587 1 --激流葬
73599290 1 --ソウルドレイン
03280747 1 --第六感
36468556 1 --停戦協定
46652477 1 --転生の予言
29401950 1 --奈落の落とし穴
......
......@@ -1976,6 +1976,7 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
newchain.triggering_player = priority;
core.select_chains.push_back(newchain);
core.delayed_quick_tmp.erase(make_pair(peffect, *evit));
core.delayed_quick_break.erase(make_pair(peffect, *evit));
}
}
pr = effects.quick_o_effect.equal_range(evit->event_code);
......@@ -1992,6 +1993,7 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
newchain.triggering_player = priority;
core.select_chains.push_back(newchain);
core.delayed_quick_tmp.erase(make_pair(peffect, *evit));
core.delayed_quick_break.erase(make_pair(peffect, *evit));
}
}
evit++;
......
......@@ -57,7 +57,6 @@ function c16259549.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function c16259549.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
if Duel.SelectYesNo(tp,aux.Stringid(16259549,2)) then
......
......@@ -41,6 +41,13 @@ function c1710476.initial_effect(c)
e7:SetCode(EFFECT_SELF_DESTROY)
e7:SetCondition(c1710476.descon)
c:RegisterEffect(e7)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD)
e8:SetCode(EFFECT_SELF_DESTROY)
e8:SetRange(LOCATION_MZONE)
e8:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e8:SetTarget(c1710476.destarget)
c:RegisterEffect(e8)
--cannot announce
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD)
......@@ -60,8 +67,8 @@ end
function c1710476.sumlimit(e,c)
return c:IsSetCard(0x23)
end
function c1710476.exfilter(c,fid)
return c:IsFaceup() and c:IsSetCard(0x23) and (fid==nil or c:GetFieldID()<fid)
function c1710476.exfilter(c)
return c:IsFaceup() and c:IsSetCard(0x23)
end
function c1710476.excon(e)
return Duel.IsExistingMatchingCard(c1710476.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
......@@ -80,11 +87,12 @@ function c1710476.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Remove(tc,POS_FACEUP,REASON_COST)
end
function c1710476.descon(e)
local c=e:GetHandler()
local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5)
local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup()))
or Duel.IsExistingMatchingCard(c1710476.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetFieldID())
return (f1==nil or f1:IsFacedown()) and (f2==nil or f2:IsFacedown())
end
function c1710476.destarget(e,c)
return c:IsSetCard(0x23) and c:GetFieldID()>e:GetHandler():GetFieldID()
end
function c1710476.antarget(e,c)
return c~=e:GetHandler()
......
......@@ -56,12 +56,12 @@ function c20457551.atkdown(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetAttacker()~=eqc and Duel.GetAttackTarget()~=eqc then return end
local tc=eqc:GetBattleTarget()
if tc then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL)
e1:SetValue(-eqc:GetLevel()*100)
tc:RegisterEffect(e1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL)
e1:SetValue(-eqc:GetLevel()*100)
tc:RegisterEffect(e1)
end
end
function c20457551.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -21,8 +21,9 @@ function c28357177.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
end
function c28357177.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if g then g=g:Filter(Card.IsRelateToEffect,nil,e)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if tg then
local g=tg:Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
......
......@@ -45,8 +45,7 @@ function c30834988.operation(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
if Duel.GetFlagEffect(tp,30834988)==0 then
if Duel.GetFlagEffect(tp,30834988)==0 then
Duel.RegisterFlagEffect(tp,30834988,RESET_PHASE+PHASE_END,0,1)
e:SetLabel(0)
else
......
......@@ -27,5 +27,5 @@ function c35183853.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
function c35183853.aclimit(e,re,tp)
return re:GetHandler():IsType(TYPE_SPELL+TYPE_TRAP)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
......@@ -41,6 +41,13 @@ function c36521459.initial_effect(c)
e7:SetCode(EFFECT_SELF_DESTROY)
e7:SetCondition(c36521459.descon)
c:RegisterEffect(e7)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD)
e8:SetCode(EFFECT_SELF_DESTROY)
e8:SetRange(LOCATION_MZONE)
e8:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e8:SetTarget(c36521459.destarget)
c:RegisterEffect(e8)
--cannot announce
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD)
......@@ -72,8 +79,8 @@ end
function c36521459.indes(e,c)
return c:IsFaceup() and c:GetSequence()==5
end
function c36521459.exfilter(c,fid)
return c:IsFaceup() and c:IsSetCard(0x23) and (fid==nil or c:GetFieldID()<fid)
function c36521459.exfilter(c)
return c:IsFaceup() and c:IsSetCard(0x23)
end
function c36521459.excon(e)
return Duel.IsExistingMatchingCard(c36521459.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
......@@ -92,11 +99,12 @@ function c36521459.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Remove(tc,POS_FACEUP,REASON_COST)
end
function c36521459.descon(e)
local c=e:GetHandler()
local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5)
local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup()))
or Duel.IsExistingMatchingCard(c36521459.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetFieldID())
return (f1==nil or f1:IsFacedown()) and (f2==nil or f2:IsFacedown())
end
function c36521459.destarget(e,c)
return c:IsSetCard(0x23) and c:GetFieldID()>e:GetHandler():GetFieldID()
end
function c36521459.antarget(e,c)
return c~=e:GetHandler()
......
......@@ -45,6 +45,13 @@ function c37115575.initial_effect(c)
e7:SetCode(EFFECT_SELF_DESTROY)
e7:SetCondition(c37115575.descon)
c:RegisterEffect(e7)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD)
e8:SetCode(EFFECT_SELF_DESTROY)
e8:SetRange(LOCATION_MZONE)
e8:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e8:SetTarget(c37115575.destarget)
c:RegisterEffect(e8)
--spson
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE)
......@@ -65,8 +72,8 @@ end
function c37115575.sumlimit(e,c)
return c:IsSetCard(0x23)
end
function c37115575.exfilter(c,fid)
return c:IsFaceup() and c:IsSetCard(0x23) and (fid==nil or c:GetFieldID()<fid)
function c37115575.exfilter(c)
return c:IsFaceup() and c:IsSetCard(0x23)
end
function c37115575.excon(e)
return Duel.IsExistingMatchingCard(c37115575.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
......@@ -95,11 +102,12 @@ function c37115575.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c37115575.descon(e)
local c=e:GetHandler()
local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5)
local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup()))
or Duel.IsExistingMatchingCard(c37115575.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetFieldID())
return (f1==nil or f1:IsFacedown()) and (f2==nil or f2:IsFacedown())
end
function c37115575.destarget(e,c)
return c:IsSetCard(0x23) and c:GetFieldID()>e:GetHandler():GetFieldID()
end
function c37115575.defilter(c)
return c:IsFaceup() and c:IsDestructable()
......
......@@ -12,7 +12,7 @@ function c38411870.initial_effect(c)
c:RegisterEffect(e1)
end
function c38411870.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)+Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0)>=4
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)>=4
end
function c38411870.filter(c)
return c:IsFaceup() and c:IsDestructable()
......
......@@ -41,7 +41,6 @@ function c47660516.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
if Duel.GetOverlayCount(tp,0,1)~=0 then
Duel.BreakEffect()
local g1=Duel.GetOverlayGroup(tp,0,1)
......
......@@ -34,20 +34,19 @@ function c54306223.initial_effect(c)
c:RegisterEffect(e4)
end
function c54306223.atkval(e,c)
if c:IsCode(72677437) then return 0 end
return c:GetCounter(0x9)*-500
end
function c54306223.acop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsCanAddCounter(0x9,1) and not tc:IsSetCard(0x50) and not tc:IsCode(72677437) then
if tc and tc:IsCanAddCounter(0x9,1) and not tc:IsSetCard(0x50) then
tc:AddCounter(0x9,1)
end
end
for i=0,4 do
local tc=Duel.GetFieldCard(1-tp,LOCATION_MZONE,i)
if tc and tc:IsCanAddCounter(0x9,1) and not tc:IsSetCard(0x50) and not tc:IsCode(72677437) then
if tc and tc:IsCanAddCounter(0x9,1) and not tc:IsSetCard(0x50) then
tc:AddCounter(0x9,1)
end
end
......
......@@ -41,6 +41,13 @@ function c55343236.initial_effect(c)
e7:SetCode(EFFECT_SELF_DESTROY)
e7:SetCondition(c55343236.descon)
c:RegisterEffect(e7)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD)
e8:SetCode(EFFECT_SELF_DESTROY)
e8:SetRange(LOCATION_MZONE)
e8:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e8:SetTarget(c55343236.destarget)
c:RegisterEffect(e8)
--cannot announce
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD)
......@@ -53,8 +60,8 @@ end
function c55343236.sumlimit(e,c)
return c:IsSetCard(0x23)
end
function c55343236.exfilter(c,fid)
return c:IsFaceup() and c:IsSetCard(0x23) and (fid==nil or c:GetFieldID()<fid)
function c55343236.exfilter(c)
return c:IsFaceup() and c:IsSetCard(0x23)
end
function c55343236.excon(e)
return Duel.IsExistingMatchingCard(c55343236.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
......@@ -73,11 +80,12 @@ function c55343236.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Remove(tc,POS_FACEUP,REASON_COST)
end
function c55343236.descon(e)
local c=e:GetHandler()
local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5)
local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup()))
or Duel.IsExistingMatchingCard(c55343236.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetFieldID())
return (f1==nil or f1:IsFacedown()) and (f2==nil or f2:IsFacedown())
end
function c55343236.destarget(e,c)
return c:IsSetCard(0x23) and c:GetFieldID()>e:GetHandler():GetFieldID()
end
function c55343236.antarget(e,c)
return c~=e:GetHandler()
......
......@@ -27,11 +27,10 @@ function c5606466.filter3(c,e,tp)
return c:IsFacedown() and c:GetSummonPlayer()==tp and c:IsCanBeEffectTarget(e) and c:IsDestructable() and c:IsAbleToRemove()
end
function c5606466.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tc=eg:GetFirst()
if chkc then return false end
if chk==0 then
local sg=eg:Filter(c5606466.filter,nil,e,1-tp)
return sg:GetCount()==1 and Duel.IsExistingMatchingCard(c5606466.filter2,tp,LOCATION_MZONE,0,1,sg:GetFirst(),e,1-tp)
return sg:GetCount()==1 and Duel.IsExistingMatchingCard(c5606466.filter2,tp,LOCATION_MZONE,0,1,sg:GetFirst(),e)
end
local sg1=eg:Filter(c5606466.filter,nil,e,1-tp)
e:SetLabelObject(sg1:GetFirst())
......@@ -43,11 +42,10 @@ function c5606466.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,sg1,sg1:GetCount(),0,0)
end
function c5606466.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tc=eg:GetFirst()
if chkc then return false end
if chk==0 then
local sg=eg:Filter(c5606466.filter3,nil,e,1-tp)
return sg:GetCount()==1 and Duel.IsExistingMatchingCard(c5606466.filter2,tp,LOCATION_MZONE,0,1,sg:GetFirst(),e,1-tp)
return sg:GetCount()==1 and Duel.IsExistingMatchingCard(c5606466.filter2,tp,LOCATION_MZONE,0,1,sg:GetFirst(),e)
end
local sg1=eg:Filter(c5606466.filter3,nil,e,1-tp)
e:SetLabelObject(sg1:GetFirst())
......
......@@ -40,7 +40,7 @@ function c57421866.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(-1)
tc:RegisterEffect(e1)
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if tc:RegisterEffect(e1) and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -41,6 +41,13 @@ function c598988.initial_effect(c)
e7:SetCode(EFFECT_SELF_DESTROY)
e7:SetCondition(c598988.descon)
c:RegisterEffect(e7)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD)
e8:SetCode(EFFECT_SELF_DESTROY)
e8:SetRange(LOCATION_MZONE)
e8:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e8:SetTarget(c598988.destarget)
c:RegisterEffect(e8)
--cannot announce
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD)
......@@ -60,8 +67,8 @@ end
function c598988.sumlimit(e,c)
return c:IsSetCard(0x23)
end
function c598988.exfilter(c,fid)
return c:IsFaceup() and c:IsSetCard(0x23) and (fid==nil or c:GetFieldID()<fid)
function c598988.exfilter(c)
return c:IsFaceup() and c:IsSetCard(0x23)
end
function c598988.excon(e)
return Duel.IsExistingMatchingCard(c598988.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
......@@ -81,11 +88,12 @@ function c598988.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Remove(tg,POS_FACEUP,REASON_COST)
end
function c598988.descon(e)
local c=e:GetHandler()
local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5)
local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup()))
or Duel.IsExistingMatchingCard(c598988.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetFieldID())
return (f1==nil or f1:IsFacedown()) and (f2==nil or f2:IsFacedown())
end
function c598988.destarget(e,c)
return c:IsSetCard(0x23) and c:GetFieldID()>e:GetHandler():GetFieldID()
end
function c598988.antarget(e,c)
return c~=e:GetHandler()
......
......@@ -34,8 +34,9 @@ function c69042950.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummonStep(g:GetFirst(),0,tp,tp,false,false,POS_FACEUP)
end
end
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c69042950.spfilter,1-tp,LOCATION_HAND,0,1,nil,e,1-tp)
and Duel.SelectYesNo(1-tp,aux.Stringid(69042950,0)) then
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c69042950.spfilter,1-tp,LOCATION_HAND,0,1,nil,e,1-tp)
and Duel.SelectYesNo(1-tp,aux.Stringid(69042950,0)) then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(1-tp,c69042950.spfilter,1-tp,LOCATION_HAND,0,1,1,nil,e,1-tp)
if g:GetCount()~=0 then
......
......@@ -4,7 +4,6 @@ function c71098407.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c71098407.condition)
e1:SetTarget(c71098407.target)
......@@ -12,8 +11,8 @@ function c71098407.initial_effect(c)
c:RegisterEffect(e1)
end
function c71098407.condition(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
and re:GetHandler():IsOnField() and re:GetHandler():IsPosition(POS_FACEUP_ATTACK)
return rp~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
and re:GetHandler():IsLocation(LOCATION_MZONE) and re:GetHandler():IsPosition(POS_FACEUP_ATTACK)
end
function c71098407.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -26,6 +26,13 @@ function c72677437.initial_effect(c)
e3:SetTarget(c72677437.target)
e3:SetOperation(c72677437.operation)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetValue(c72677437.efilter)
c:RegisterEffect(e4)
end
function c72677437.splimit(e,se,sp,st)
return not se:GetHandler():IsType(TYPE_MONSTER)
......@@ -55,3 +62,6 @@ function c72677437.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,true,false,POS_FACEUP)
end
end
function c72677437.efilter(e,te)
return te:GetHandler():IsCode(54306223)
end
......@@ -40,19 +40,24 @@ function c73578229.efilter(e,te)
end
function c73578229.adjustop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local ag=g:GetMaxGroup(Card.GetAttack)
local preg=e:GetLabelObject()
if not ag or ag:Equal(preg) then return end
preg:Clear()
preg:Merge(ag)
if g:GetCount()>0 then
local ag=g:GetMaxGroup(Card.GetAttack)
if ag:Equal(preg) then return end
preg:Clear()
preg:Merge(ag)
else
if preg:GetCount()==0 then return end
preg:Clear()
end
Duel.AdjustInstantly(e:GetHandler())
Duel.Readjust()
end
function c73578229.desop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_ACTIVATED) then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local ag=g:GetMaxGroup(Card.GetAttack)
if ag then
if g:GetCount()>0 then
local ag=g:GetMaxGroup(Card.GetAttack)
Duel.Destroy(ag,REASON_EFFECT)
end
end
......
......@@ -83,11 +83,10 @@ function c74530899.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(1-tp,ct*300,REASON_EFFECT)
end
function c74530899.tdcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==e:GetHandler():GetControler()
return Duel.GetTurnPlayer()==tp
end
function c74530899.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:GetHandler():CreateEffectRelation(e)
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c74530899.tdop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -44,6 +44,7 @@ function c75498415.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK)
e2:SetProperty(EFFECT_FLAG_OATH)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c75498415.ftarget)
e2:SetLabel(g:GetFirst():GetFieldID())
......
......@@ -21,7 +21,7 @@ function c82377606.filter(c)
end
function c82377606.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c82377606.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c82377606.filter,tp,LOCATION_MZONE,0,1,nil) end
if chk==0 then return Duel.IsExistingTarget(c82377606.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c82377606.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
......
......@@ -77,16 +77,12 @@ function c83438826.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local eq=c:GetEquipTarget()
if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) or tc:IsFaceup() or
not eq:IsAttackAbove(500)
then return end
if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) or tc:IsFaceup() or not eq:IsAttackAbove(500) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-500)
e1:SetReset(RESET_EVENT+0x1fe0000)
if eq:RegisterEffect(e1) then
Duel.Destroy(tc,REASON_EFFECT)
end
......
......@@ -33,7 +33,6 @@ end
function c87911394.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c87911394.atkcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttackTarget()
return at and at:IsFaceup() and e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x7f)
......
......@@ -36,13 +36,11 @@ function c93717133.rmcon(e,tp,eg,ep,ev,re,r,rp)
end
function c93717133.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if chk==0 then return (a==e:GetHandler() and d and d:IsOnField() and d:IsCanBeEffectTarget(e) and a:IsAbleToRemove() and d:IsAbleToRemove())
or (d==e:GetHandler() and a:IsOnField() and a:IsCanBeEffectTarget(e) and a:IsAbleToRemove() and d:IsAbleToRemove()) end
if a==e:GetHandler() then Duel.SetTargetCard(d)
else Duel.SetTargetCard(a) end
local g=Group.FromCards(a,d)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if chk==0 then return bc and bc:IsOnField() and bc:IsCanBeEffectTarget(e) and c:IsAbleToRemove() and bc:IsAbleToRemove() end
Duel.SetTargetCard(bc)
local g=Group.FromCards(c,bc)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0)
end
function c93717133.rmop(e,tp,eg,ep,ev,re,r,rp)
......@@ -52,37 +50,43 @@ function c93717133.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.FromCards(c,tc)
local mcount=0
if tc:IsFaceup() then mcount=tc:GetOverlayCount() end
Duel.Remove(g,0,REASON_EFFECT+REASON_TEMPORARY)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_REMOVED)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE)
e1:SetLabelObject(c)
e1:SetLabel(mcount)
e1:SetCountLimit(1)
e1:SetOperation(c93717133.retop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_REMOVED)
e2:SetCode(EVENT_PHASE+PHASE_BATTLE)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE)
e2:SetLabelObject(tc)
e2:SetLabel(0)
e2:SetCountLimit(1)
e2:SetOperation(c93717133.retop)
tc:RegisterEffect(e2)
if Duel.Remove(g,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local og=Duel.GetOperatedGroup()
if not og:IsContains(tc) then mcount=0 end
local oc=og:GetFirst()
while oc do
oc:RegisterFlagEffect(93717133,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
oc=og:GetNext()
end
og:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE)
e1:SetReset(RESET_PHASE+PHASE_BATTLE)
e1:SetLabel(mcount)
e1:SetCountLimit(1)
e1:SetLabelObject(og)
e1:SetOperation(c93717133.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c93717133.retfilter(c)
return c:GetFlagEffect(93717133)~=0
end
function c93717133.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetLabelObject()
Duel.ReturnToField(c)
if c:IsOnField() and c:IsFaceup() and e:GetLabel()~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(e:GetLabel()*500)
c:RegisterEffect(e1)
local g=e:GetLabelObject()
local sg=g:Filter(c93717133.retfilter,nil)
g:DeleteGroup()
local tc=sg:GetFirst()
while tc do
if Duel.ReturnToField(tc) and tc==e:GetOwner() and tc:IsFaceup() and e:GetLabel()~=0 then
local e1=Effect.CreateEffect(e:GetOwner())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1ff0000)
e1:SetValue(e:GetLabel()*500)
e:GetOwner():RegisterEffect(e1)
end
tc=sg:GetNext()
end
end
......@@ -41,6 +41,13 @@ function c9433350.initial_effect(c)
e7:SetCode(EFFECT_SELF_DESTROY)
e7:SetCondition(c9433350.descon)
c:RegisterEffect(e7)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD)
e8:SetCode(EFFECT_SELF_DESTROY)
e8:SetRange(LOCATION_MZONE)
e8:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e8:SetTarget(c9433350.destarget)
c:RegisterEffect(e8)
--cannot announce
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD)
......@@ -53,8 +60,8 @@ end
function c9433350.sumlimit(e,c)
return c:IsSetCard(0x23)
end
function c9433350.exfilter(c,fid)
return c:IsFaceup() and c:IsSetCard(0x23) and (fid==nil or c:GetFieldID()<fid)
function c9433350.exfilter(c)
return c:IsFaceup() and c:IsSetCard(0x23)
end
function c9433350.excon(e)
return Duel.IsExistingMatchingCard(c9433350.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
......@@ -73,11 +80,12 @@ function c9433350.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Remove(tc,POS_FACEUP,REASON_COST)
end
function c9433350.descon(e)
local c=e:GetHandler()
local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5)
local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup()))
or Duel.IsExistingMatchingCard(c9433350.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetFieldID())
return (f1==nil or f1:IsFacedown()) and (f2==nil or f2:IsFacedown())
end
function c9433350.destarget(e,c)
return c:IsSetCard(0x23) and c:GetFieldID()>e:GetHandler():GetFieldID()
end
function c9433350.antarget(e,c)
return c~=e:GetHandler()
......
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