Commit 1084efd6 authored by argon.sun's avatar argon.sun

fix

parent eebd29db
...@@ -51,9 +51,9 @@ function c35950025.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,9 +51,9 @@ function c35950025.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(-1000) e1:SetValue(-1000)
e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end local tc=Duel.GetFirstTarget()
local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then
if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) end
end end
end end
...@@ -27,12 +27,12 @@ function c41925941.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -27,12 +27,12 @@ function c41925941.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c41925941.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c41925941.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetLabelObject() local bc=e:GetLabelObject()
if chk==0 then return Duel.GetLP(tp)>100 and bc:IsAttackAbove(100) and bc:IsDefenceAbove(100) end if chk==0 then return Duel.GetLP(tp)>100 and (bc:IsAttackAbove(100) or bc:IsDefenceAbove(100)) end
local maxc=Duel.GetLP(tp) local maxc=Duel.GetLP(tp)
local atk=bc:GetAttack() local maxpay=bc:GetAttack()
local def=bc:GetDefence() local def=bc:GetDefence()
if atk<maxc then maxc=atk end if maxpay<def then maxpay=def end
if def<maxc then maxc=def end if maxpay<maxc then maxc=maxpay end
if maxc>5000 then maxc=5000 end if maxc>5000 then maxc=5000 end
local t={} local t={}
for i=1,maxc/100 do for i=1,maxc/100 do
......
...@@ -33,11 +33,14 @@ function c61344030.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -33,11 +33,14 @@ function c61344030.cost(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,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end end
function c61344030.filter(c)
return c:IsFacup() and c:GetAttack()>0
end
function c61344030.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c61344030.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 chkc:IsFaceup() end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c61344030.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c61344030.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,c61344030.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end end
function c61344030.operation(e,tp,eg,ep,ev,re,r,rp) function c61344030.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -3,7 +3,7 @@ function c62107612.initial_effect(c) ...@@ -3,7 +3,7 @@ function c62107612.initial_effect(c)
--damage --damage
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(62107612,0)) e1:SetDescription(aux.Stringid(62107612,0))
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_REMOVE) e1:SetCode(EVENT_REMOVE)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
...@@ -14,7 +14,7 @@ function c62107612.initial_effect(c) ...@@ -14,7 +14,7 @@ function c62107612.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c62107612.condition(e,tp,eg,ep,ev,re,r,rp) function c62107612.condition(e,tp,eg,ep,ev,re,r,rp)
return re:GetDescription()==aux.Stringid(93717133,0) return bit.band(r,REASON_EFFECT)~=0 and re:GetHandler():GetCode()==93717133
end end
function c62107612.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c62107612.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,62107612)==0 and e:GetHandler():IsAbleToGraveAsCost() end if chk==0 then return Duel.GetFlagEffect(tp,62107612)==0 and e:GetHandler():IsAbleToGraveAsCost() end
......
...@@ -16,7 +16,7 @@ function c64187086.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -16,7 +16,7 @@ function c64187086.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end end
function c64187086.filter1(c) function c64187086.filter1(c)
return c:IsSetCard(0x21) and c:IsAbleToHand() return c:IsSetCard(0x21) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function c64187086.filter2(c) function c64187086.filter2(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToHand() return c:IsType(TYPE_FIELD) and c:IsAbleToHand()
......
...@@ -44,9 +44,15 @@ function c65676461.atop(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,9 +44,15 @@ function c65676461.atop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
bc:RegisterEffect(e1) bc:RegisterEffect(e1)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end if c:IsFaceup() and c:IsRelateToEffect(e) then
if c:IsFaceup() and c:IsRelateToEffect(e) then Duel.BreakEffect()
Duel.BreakEffect() local e1=Effect.CreateEffect(c)
Duel.ChainAttack() e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end end
end end
...@@ -27,8 +27,10 @@ function c97617181.initial_effect(c) ...@@ -27,8 +27,10 @@ function c97617181.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--leave --leave
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e5:SetDescription(aux.Stringid(97617181,0))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_LEAVE_FIELD) e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetCondition(c97617181.atkcon)
e5:SetOperation(c97617181.atkop) e5:SetOperation(c97617181.atkop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
...@@ -68,10 +70,19 @@ function c97617181.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,10 +70,19 @@ function c97617181.operation(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
function c97617181.atkop(e,tp,eg,ep,ev,re,r,rp) function c97617181.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=c:GetFirstCardTarget() local tc=c:GetFirstCardTarget()
if tc and tc:IsLocation(LOCATION_MZONE) then if tc and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() then
e:SetLabelObject(tc)
tc:CreateEffectRelation(e)
return true
else return false end
end
function c97617181.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
...@@ -85,7 +96,7 @@ function c97617181.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -85,7 +96,7 @@ function c97617181.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=c:GetEquipTarget() local ec=c:GetEquipTarget()
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
if chk==0 then return (ph>PHASE_MAIN1 and ph<PHASE_MAIN2) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) end if chk==0 then return (ph>PHASE_MAIN1 and ph<PHASE_MAIN2) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) end
return Duel.SelectYesNo(tp,aux.Stringid(97617181,0)) return Duel.SelectYesNo(tp,aux.Stringid(97617181,1))
end end
function c97617181.desrepop(e,tp,eg,ep,ev,re,r,rp) function c97617181.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE)
......
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