Commit bec4e993 authored by VanillaSalt's avatar VanillaSalt

fix

parent 4678704f
...@@ -54,7 +54,7 @@ function c11609969.sctg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -54,7 +54,7 @@ function c11609969.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local scl=math.max(1,e:GetHandler():GetLeftScale()-2) local scl=math.max(1,e:GetHandler():GetLeftScale()-2)
local g=Duel.GetMatchingGroup(c11609969.filter,tp,LOCATION_MZONE,0,nil,scl) local g=Duel.GetMatchingGroup(c11609969.filter,tp,LOCATION_MZONE,0,nil,scl)
if c:GetLeftScale()>1 then if e:GetHandler():GetLeftScale()>1 then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
end end
......
...@@ -28,9 +28,9 @@ end ...@@ -28,9 +28,9 @@ end
function c64332231.desop(e,tp,eg,ep,ev,re,r,rp) function c64332231.desop(e,tp,eg,ep,ev,re,r,rp)
local ct1=Duel.GetMatchingGroupCount(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local ct1=Duel.GetMatchingGroupCount(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local rg=Duel.SelectReleaseGroupEx(tp,Card.IsReleasableByEffect,1,ct1,nil) local rg=Duel.SelectReleaseGroupEx(tp,Card.IsReleasableByEffect,1,ct1,nil)
Duel.Release(rg,REASON_EFFECT) local ct2=Duel.Release(rg,REASON_EFFECT)
if ct2==0 then return end
Duel.BreakEffect() Duel.BreakEffect()
local ct2=rg:GetCount()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct2,ct2,nil) local dg=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct2,ct2,nil)
Duel.HintSelection(dg) Duel.HintSelection(dg)
......
...@@ -67,7 +67,7 @@ function c71422989.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,7 +67,7 @@ function c71422989.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c71422989.filter1,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil,e) local mg1=Duel.GetMatchingGroup(c71422989.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c71422989.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) local sg1=Duel.GetMatchingGroup(c71422989.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
......
...@@ -64,6 +64,7 @@ function c73360025.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -64,6 +64,7 @@ function c73360025.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c73360025.spop(e,tp,eg,ep,ev,re,r,rp) function c73360025.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c73360025.mfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e) local mg1=Duel.GetMatchingGroup(c73360025.mfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c73360025.spfilter1,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) local sg1=Duel.GetMatchingGroup(c73360025.spfilter1,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
......
...@@ -55,13 +55,13 @@ function c74605254.sctg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -55,13 +55,13 @@ function c74605254.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local scl=math.min(10,e:GetHandler():GetLeftScale()+2) local scl=math.min(10,e:GetHandler():GetLeftScale()+2)
local g=Duel.GetMatchingGroup(c74605254.filter,tp,LOCATION_MZONE,0,nil,scl) local g=Duel.GetMatchingGroup(c74605254.filter,tp,LOCATION_MZONE,0,nil,scl)
if c:GetLeftScale()<10 then if e:GetHandler():GetLeftScale()<10 then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
end end
function c74605254.scop(e,tp,eg,ep,ev,re,r,rp) function c74605254.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:GetLeftScale()==10 then return end if not c:IsRelateToEffect(e) or c:GetLeftScale()>=10 then return end
local scl=math.min(10,c:GetLeftScale()+2) local scl=math.min(10,c:GetLeftScale()+2)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -14,7 +14,7 @@ function c79636594.initial_effect(c) ...@@ -14,7 +14,7 @@ function c79636594.initial_effect(c)
e2:SetDescription(aux.Stringid(79636594,0)) e2:SetDescription(aux.Stringid(79636594,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,79636594) e2:SetCountLimit(1,79636594)
e2:SetTarget(c79636594.sptg) e2:SetTarget(c79636594.sptg)
......
...@@ -5,6 +5,10 @@ function c9765723.initial_effect(c) ...@@ -5,6 +5,10 @@ function c9765723.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_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetHintTiming(0,TIMING_DAMAGE_STEP)
e1:SetCondition(c9765723.condition)
e1:SetTarget(c9765723.target)
e1:SetOperation(c9765723.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--destroy --destroy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -38,16 +42,69 @@ function c9765723.initial_effect(c) ...@@ -38,16 +42,69 @@ function c9765723.initial_effect(c)
e4:SetRange(LOCATION_SZONE) e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1) e4:SetCountLimit(1)
e4:SetCondition(c9765723.damcon) e4:SetCondition(c9765723.damcon)
e4:SetCost(c9765723.damcost)
e4:SetTarget(c9765723.damtg) e4:SetTarget(c9765723.damtg)
e4:SetOperation(c9765723.damop) e4:SetOperation(c9765723.damop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c9765723.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c9765723.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsDestructable() end
if chk==0 then return true end
local ph=Duel.GetCurrentPhase()
if ph==PHASE_DAMAGE then return end
local b1=Duel.GetFlagEffect(tp,9765723)==0
and Duel.IsExistingMatchingCard(c9765723.cfilter,tp,LOCATION_HAND,0,1,nil)
and Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
local b2=Duel.GetTurnPlayer()==tp and ph==PHASE_STANDBY
if (b1 or b2) and Duel.SelectYesNo(tp,aux.Stringid(9765723,2)) then
local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(9765723,0),aux.Stringid(9765723,1))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(9765723,0))
else op=Duel.SelectOption(tp,aux.Stringid(9765723,1))+1 end
e:SetLabel(op)
if op==0 then
e:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
Duel.DiscardHand(tp,c9765723.cfilter,1,1,REASON_COST)
Duel.RegisterFlagEffect(tp,9765723,RESET_PHASE+PHASE_END,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
else
e:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e:GetHandler():RegisterFlagEffect(9765723,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000)
end
else
e:SetLabel(2)
e:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
end
end
function c9765723.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local op=e:GetLabel()
if op==0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
elseif op==1 then
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
end
function c9765723.cfilter(c) function c9765723.cfilter(c)
return (c:IsSetCard(0xaf) or c:IsSetCard(0xae)) and c:IsAbleToGraveAsCost() return (c:IsSetCard(0xaf) or c:IsSetCard(0xae)) and c:IsAbleToGraveAsCost()
end end
function c9765723.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c9765723.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9765723.cfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.GetFlagEffect(tp,9765723)==0
and Duel.IsExistingMatchingCard(c9765723.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c9765723.cfilter,1,1,REASON_COST) Duel.DiscardHand(tp,c9765723.cfilter,1,1,REASON_COST)
Duel.RegisterFlagEffect(tp,9765723,RESET_PHASE+PHASE_END,0,1)
end end
function c9765723.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9765723.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsDestructable() end if chkc then return chkc:IsOnField() and chkc:IsDestructable() end
...@@ -72,6 +129,10 @@ end ...@@ -72,6 +129,10 @@ end
function c9765723.damcon(e,tp,eg,ep,ev,re,r,rp) function c9765723.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()==tp
end end
function c9765723.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(9765723)==0 end
e:GetHandler():RegisterFlagEffect(9765723,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
function c9765723.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function c9765723.damtg(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)
......
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