Commit d097ce8c authored by VanillaSalt's avatar VanillaSalt

fix

parent f99d7eef
...@@ -5,7 +5,7 @@ function c1006081.initial_effect(c) ...@@ -5,7 +5,7 @@ function c1006081.initial_effect(c)
e1:SetDescription(aux.Stringid(1006081,0)) e1:SetDescription(aux.Stringid(1006081,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,1006081) e1:SetCountLimit(1,1006081)
e1:SetTarget(c1006081.target) e1:SetTarget(c1006081.target)
e1:SetOperation(c1006081.operation) e1:SetOperation(c1006081.operation)
...@@ -39,7 +39,7 @@ function c1006081.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +39,7 @@ function c1006081.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+0x1fe0000)
if e:GetLabel()==0 then if e:GetLabel()==0 then
e1:SetValue(1) e1:SetValue(1)
else else
......
...@@ -44,7 +44,8 @@ function c24212820.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,7 +44,8 @@ function c24212820.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c24212820.spcon(e,tp,eg,ep,ev,re,r,rp) function c24212820.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)==0
and Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
end end
function c24212820.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c24212820.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -74,7 +75,7 @@ function c24212820.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,7 +75,7 @@ function c24212820.spop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e2,true) c:RegisterEffect(e2,true)
end end
end end
function c24212820.defcon(e,tp,eg,ep,ev,re,r,rp) function c24212820.defcon(e)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end end
function c24212820.filter(c) function c24212820.filter(c)
......
...@@ -6,7 +6,6 @@ function c24590232.initial_effect(c) ...@@ -6,7 +6,6 @@ function c24590232.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c24590232.condition) e1:SetCondition(c24590232.condition)
e1:SetCost(c24590232.cost)
e1:SetOperation(c24590232.activate) e1:SetOperation(c24590232.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
...@@ -19,30 +18,28 @@ function c24590232.filter1(c,e,tp) ...@@ -19,30 +18,28 @@ function c24590232.filter1(c,e,tp)
and Duel.IsExistingMatchingCard(c24590232.filter2,tp,LOCATION_GRAVE,0,1,nil,tp,lv) and Duel.IsExistingMatchingCard(c24590232.filter2,tp,LOCATION_GRAVE,0,1,nil,tp,lv)
end end
function c24590232.filter2(c,tp,lv) function c24590232.filter2(c,tp,lv)
local rlv=0 local rlv=lv-c:GetLevel()
rlv=lv-c:GetLevel()
local rg=Duel.GetMatchingGroup(c24590232.filter3,tp,LOCATION_GRAVE,0,c) local rg=Duel.GetMatchingGroup(c24590232.filter3,tp,LOCATION_GRAVE,0,c)
return rlv>0 and c:IsType(TYPE_TUNER) and c:IsAbleToRemove() return rlv>0 and c:IsType(TYPE_TUNER) and c:IsAbleToRemove()
and rg:CheckWithSumGreater(Card.GetLevel,rlv,63) and rg:CheckWithSumEqual(Card.GetLevel,rlv,1,63)
end end
function c24590232.filter3(c,tp,lv) function c24590232.filter3(c)
return not c:IsType(TYPE_TUNER) and c:IsAbleToRemove() return c:GetLevel()>0 and not c:IsType(TYPE_TUNER) and c:IsAbleToRemove()
end end
function c24590232.activate(e,tp,eg,ep,ev,re,r,rp) function c24590232.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() if Duel.NegateAttack() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if Duel.NegateAttack() and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsExistingMatchingCard(c24590232.filter1,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(c24590232.filter1,tp,LOCATION_EXTRA,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(24590232,0)) then and Duel.SelectYesNo(tp,aux.Stringid(24590232,0)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,c24590232.filter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g1=Duel.SelectMatchingCard(tp,c24590232.filter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local lv=g1:GetFirst():GetLevel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c24590232.filter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,g1:GetLevel()) local g2=Duel.SelectMatchingCard(tp,c24590232.filter2,tp,LOCATION_GRAVE,0,1,1,nil,tp,lv)
local lv=0 local rlv=lv-g2:GetFirst():GetLevel()
lv=g1:GetLevel()-g2:GetLevel()
local rg=Duel.GetMatchingGroup(c24590232.filter3,tp,LOCATION_GRAVE,0,g2:GetFirst()) local rg=Duel.GetMatchingGroup(c24590232.filter3,tp,LOCATION_GRAVE,0,g2:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g3=rg:SelectWithSumEqual(tp,Card.GetLevel,lv,1,63) local g3=rg:SelectWithSumEqual(tp,Card.GetLevel,rlv,1,63)
g2:Merge(g3) g2:Merge(g3)
Duel.Remove(g2,POS_FACEUP,REASON_EFFECT) Duel.Remove(g2,POS_FACEUP,REASON_EFFECT)
Duel.SpecialSummon(g1,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g1,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
......
...@@ -16,7 +16,7 @@ function c25334372.atkcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,7 +16,7 @@ function c25334372.atkcon(e,tp,eg,ep,ev,re,r,rp)
if not d then return false end if not d then return false end
return a:IsControler(tp) and a:GetAttack()<d:GetAttack() and Duel.GetLP(tp)~=Duel.GetLP(1-tp) return a:IsControler(tp) and a:GetAttack()<d:GetAttack() and Duel.GetLP(tp)~=Duel.GetLP(1-tp)
end end
function c25334372.atkop(e,tp,eg,ep,ev,re,r,rp,chk) function c25334372.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=Duel.GetAttacker() local c=Duel.GetAttacker()
if c:IsFaceup() and c:IsRelateToBattle() then if c:IsFaceup() and c:IsRelateToBattle() then
local atk=math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp)) local atk=math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp))
......
...@@ -60,8 +60,8 @@ function c26556950.damop(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,8 +60,8 @@ function c26556950.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(1-tp,600,REASON_EFFECT) Duel.Damage(1-tp,600,REASON_EFFECT)
end end
function c26556950.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c26556950.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c26556950.desfilter(c,def) function c26556950.desfilter(c,def)
return c:IsFaceup() and c:IsDefenceBelow(def) and c:IsDestructable() return c:IsFaceup() and c:IsDefenceBelow(def) and c:IsDestructable()
......
...@@ -58,7 +58,7 @@ function c35058857.lvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +58,7 @@ function c35058857.lvop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(tc:GetLevel()) e1:SetValue(tc:GetLevel())
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
......
...@@ -56,7 +56,7 @@ end ...@@ -56,7 +56,7 @@ end
function c37279508.spfilter(c,e,tp) function c37279508.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c37279508.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c37279508.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c37279508.spfilter(chkc,e,tp) and chkc~=e:GetHandler() end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c37279508.spfilter(chkc,e,tp) and chkc~=e:GetHandler() end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c37279508.spfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end and Duel.IsExistingTarget(c37279508.spfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
......
...@@ -15,8 +15,8 @@ function c38491199.initial_effect(c) ...@@ -15,8 +15,8 @@ function c38491199.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c38491199.negcost(e,tp,eg,ep,ev,re,r,rp,chk) function c38491199.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end end
function c38491199.negcon(e,tp,eg,ep,ev,re,r,rp) function c38491199.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsChainNegatable(ev) and aux.damcon1(e,tp,eg,ep,ev,re,r,rp) return Duel.IsChainNegatable(ev) and aux.damcon1(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -10,12 +10,14 @@ function c50584941.initial_effect(c) ...@@ -10,12 +10,14 @@ function c50584941.initial_effect(c)
e1:SetOperation(c50584941.activate) e1:SetOperation(c50584941.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c50584941.cfilter(c) function c50584941.cfilter(c,tp)
local code=c:GetOriginalCode()
return c:IsSetCard(0x1045) and c:IsType(TYPE_SYNCHRO) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0x1045) and c:IsType(TYPE_SYNCHRO) and c:IsAbleToRemoveAsCost()
and Duel.IsExistingTarget(c50584941.filter,tp,LOCATION_MZONE,0,1,nil,code)
end end
function c50584941.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c50584941.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
if Duel.IsExistingMatchingCard(c50584941.cfilter,tp,LOCATION_GRAVE,0,1,nil) then if Duel.IsExistingMatchingCard(c50584941.cfilter,tp,LOCATION_GRAVE,0,1,nil,tp) then
e:SetLabel(1) e:SetLabel(1)
return true return true
else else
...@@ -23,22 +25,22 @@ function c50584941.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -23,22 +25,22 @@ function c50584941.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c50584941.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c50584941.cfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
e:SetLabel(g:GetFirst():GetOriginalCode()) e:SetLabel(g:GetFirst():GetOriginalCode())
end end
function c50584941.filter(c) function c50584941.filter(c,code)
return c:IsFaceup() and c:IsSetCard(0x1045) and c:IsType(TYPE_SYNCHRO) return c:IsFaceup() and c:IsSetCard(0x1045) and c:IsType(TYPE_SYNCHRO) and not c:IsCode(code)
end end
function c50584941.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c50584941.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c50584941.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c50584941.filter(chkc,e:GetLabel()) end
if chk==0 then if chk==0 then
if e:GetLabel()~=1 then return false end if e:GetLabel()~=1 then return false end
e:SetLabel(0) e:SetLabel(0)
return Duel.IsExistingTarget(c50584941.filter,tp,LOCATION_MZONE,0,1,nil) return true
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c50584941.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c50584941.filter,tp,LOCATION_MZONE,0,1,1,nil,e:GetLabel())
end end
function c50584941.activate(e,tp,eg,ep,ev,re,r,rp) function c50584941.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -5,7 +5,7 @@ function c62541668.initial_effect(c) ...@@ -5,7 +5,7 @@ function c62541668.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--remove --remove
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1006081,1)) e1:SetDescription(aux.Stringid(62541668,1))
e1:SetCategory(CATEGORY_REMOVE) e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
......
...@@ -75,10 +75,10 @@ function c63767246.atkfilter1(c,tp) ...@@ -75,10 +75,10 @@ function c63767246.atkfilter1(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsType(TYPE_XYZ) return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsType(TYPE_XYZ)
and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp
end end
function c63767246.atkcon1(e,tp,eg,ep,ev,re,r,rp) function c63767246.atkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c63767246.atkfilter1,1,nil,tp) return eg:IsExists(c63767246.atkfilter1,1,nil,tp)
end end
function c63767246.atkfilter2(c,tp) function c63767246.atkfilter2(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsType(TYPE_XYZ)
end end
function c63767246.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c63767246.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...@@ -92,18 +92,15 @@ function c63767246.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,18 +92,15 @@ function c63767246.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local g=eg:Filter(c63767246.atkfilter1,nil,tp) local g=eg:Filter(c63767246.atkfilter1,nil,tp)
if tc:IsFaceup() and tc:IsRelateToEffect(e) then if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local sg=nil
if g:GetCount()>=2 then if g:GetCount()>=2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
sg=g:Select(tp,1,1,nil) g=g:Select(tp,1,1,nil)
else
g:GetFirst()
end end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(sg:GetFirst():GetBaseAttack()) e1:SetValue(g:GetFirst():GetBaseAttack())
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
......
...@@ -14,13 +14,13 @@ function c90162951.initial_effect(c) ...@@ -14,13 +14,13 @@ function c90162951.initial_effect(c)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENCE) e2:SetCode(EFFECT_UPDATE_DEFENCE)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--damege --damage
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c90162951.damcon) e3:SetCondition(c90162951.damcon)
e3:SetOperation(c13478040.damop) e3:SetOperation(c90162951.damop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--destroy --destroy
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
...@@ -36,35 +36,35 @@ function c90162951.initial_effect(c) ...@@ -36,35 +36,35 @@ function c90162951.initial_effect(c)
end end
c90162951.xyz_number=35 c90162951.xyz_number=35
function c90162951.val(e,c) function c90162951.val(e,c)
return math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp)) return math.abs(Duel.GetLP(0)-Duel.GetLP(1))
end end
function c90162951.cfilter(c,tp) function c90162951.cfilter(c,tp)
return c:GetSummonPlayer()==tp return c:GetSummonPlayer()==tp
end end
function c90162951.damcon(e,tp,eg,ep,ev,re,r,rp) function c90162951.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetOverlayCount()>0 and eg:IsExists(c13478040.cfilter,1,nil,1-tp) return c:GetOverlayCount()>0 and eg:IsExists(c90162951.cfilter,1,nil,1-tp)
end end
function c90162951.damop(e,tp,eg,ep,ev,re,r,rp) function c90162951.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,26556950) Duel.Hint(HINT_CARD,0,90162951)
Duel.Damage(1-tp,600,REASON_EFFECT) Duel.Damage(1-tp,600,REASON_EFFECT)
end end
function c90162951.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c90162951.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c90162951.desfilter(c,atk) function c90162951.desfilter(c,atk)
return c:IsFaceup() and c:IsAttackBelow(atk) and c:IsDestructable() return c:IsFaceup() and c:IsAttackBelow(atk) and c:IsDestructable()
end end
function c90162951.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c90162951.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c90162951.desfilter,tp,LOCATION_MZONE,0,1,nil,c:GetAttack()) end if chk==0 then return Duel.IsExistingMatchingCard(c90162951.desfilter,tp,0,LOCATION_MZONE,1,nil,c:GetAttack()) end
local g=Duel.GetMatchingGroup(c90162951.desfilter,tp,LOCATION_MZONE,0,nil,c:GetAttack()) local g=Duel.GetMatchingGroup(c90162951.desfilter,tp,0,LOCATION_MZONE,nil,c:GetAttack())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c90162951.desop(e,tp,eg,ep,ev,re,r,rp) function c90162951.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(c90162951.desfilter,tp,LOCATION_MZONE,0,nil,c:GetAttack()) local g=Duel.GetMatchingGroup(c90162951.desfilter,tp,0,LOCATION_MZONE,nil,c:GetAttack())
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
...@@ -23,16 +23,15 @@ function c97001138.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -23,16 +23,15 @@ function c97001138.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c97001138.thfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c97001138.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c97001138.thfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c97001138.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectTarget(tp,c97001138.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c97001138.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function c97001138.sumfilter(c) function c97001138.sumfilter(c)
return c:IsSummonable(true,nil,1) return c:IsSummonable(true,nil,1)
end end
function c97001138.activate(e,tp,eg,ep,ev,re,r,rp) function c97001138.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
local g=Duel.GetMatchingGroup(c97001138.sumfilter,tp,LOCATION_HAND,0,nil) local g=Duel.GetMatchingGroup(c97001138.sumfilter,tp,LOCATION_HAND,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(97001138,0)) then if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(97001138,0)) then
......
--幻影騎士団シェード・ブリガンダイン --幻影騎士団シェード・ブリガンダイン
function c24212810.initial_effect(c) function c98827725.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,24212810+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,98827725+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c24212810.target) e1:SetTarget(c98827725.target)
e1:SetOperation(c24212810.activate) e1:SetOperation(c98827725.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in set turn --act in set turn
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetCondition(c24212810.actcon) e2:SetCondition(c98827725.actcon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c24212810.target(e,tp,eg,ep,ev,re,r,rp,chk) function c98827725.target(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
and Duel.IsPlayerCanSpecialSummonMonster(tp,24212810,0x10db,0x11,4,0,300,RACE_WARRIOR,ATTRIBUTE_DARK) end and Duel.IsPlayerCanSpecialSummonMonster(tp,98827725,0x10db,0x11,4,0,300,RACE_WARRIOR,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c24212810.activate(e,tp,eg,ep,ev,re,r,rp) function c98827725.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 c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) if c:IsRelateToEffect(e)
and Duel.IsPlayerCanSpecialSummonMonster(tp,24212810,0x10db,0x11,4,0,300,RACE_WARRIOR,ATTRIBUTE_DARK) then and Duel.IsPlayerCanSpecialSummonMonster(tp,98827725,0x10db,0x11,4,0,300,RACE_WARRIOR,ATTRIBUTE_DARK) then
c:SetStatus(STATUS_NO_LEVEL,false) c:SetStatus(STATUS_NO_LEVEL,false)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -38,6 +38,6 @@ function c24212810.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,6 +38,6 @@ function c24212810.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_DEFENCE) Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_DEFENCE)
end end
end end
function c24212810.actcon(e) function c98827725.actcon(e)
return not Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil,TYPE_TRAP) return not Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil,TYPE_TRAP)
end end
...@@ -7,6 +7,7 @@ function c99940363.initial_effect(c) ...@@ -7,6 +7,7 @@ function c99940363.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c99940363.condition)
e1:SetTarget(c99940363.target) e1:SetTarget(c99940363.target)
e1:SetOperation(c99940363.operation) e1:SetOperation(c99940363.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -22,6 +23,12 @@ function c99940363.initial_effect(c) ...@@ -22,6 +23,12 @@ function c99940363.initial_effect(c)
e2:SetOperation(c99940363.operation) e2:SetOperation(c99940363.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c99940363.mfilter(c)
return c:IsFaceup() and c:IsAttackAbove(2400) and c:GetDefence()==1000
end
function c99940363.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c99940363.mfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c99940363.filter(c) function c99940363.filter(c)
return c:IsFacedown() and c:IsDestructable() return c:IsFacedown() and c:IsDestructable()
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