Commit 921022a2 authored by argon.sun's avatar argon.sun

fix

parent 8fdc77c9
...@@ -6,6 +6,7 @@ function c40230018.initial_effect(c) ...@@ -6,6 +6,7 @@ function c40230018.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c40230018.condition)
e1:SetCost(c40230018.cost) e1:SetCost(c40230018.cost)
e1:SetTarget(c40230018.target) e1:SetTarget(c40230018.target)
e1:SetOperation(c40230018.operation) e1:SetOperation(c40230018.operation)
...@@ -35,6 +36,12 @@ function c40230018.clear(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,6 +36,12 @@ function c40230018.clear(e,tp,eg,ep,ev,re,r,rp)
c40230018[0]=true c40230018[0]=true
c40230018[1]=true c40230018[1]=true
end end
function c40230018.cfilter(c)
return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL)
end
function c40230018.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c40230018.cfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function c40230018.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c40230018.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,40230018)==0 and c40230018[tp] end if chk==0 then return Duel.GetFlagEffect(tp,40230018)==0 and c40230018[tp] end
Duel.RegisterFlagEffect(tp,40230018,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) Duel.RegisterFlagEffect(tp,40230018,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
......
...@@ -26,9 +26,9 @@ function c67959180.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -26,9 +26,9 @@ function c67959180.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetReset(RESET_EVENT+0x1ff0000) e1:SetReset(RESET_EVENT+0x1ff0000)
if opt==coin then if opt==coin then
e1:SetValue(c:GetAttack()/2) e1:SetValue(c:GetBaseAttack()/2)
else else
e1:SetValue(c:GetAttack()*2) e1:SetValue(c:GetBaseAttack()*2)
end end
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
......
...@@ -20,8 +20,15 @@ function c7165085.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -20,8 +20,15 @@ function c7165085.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SelectTarget(tp,c7165085.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,e:GetHandler()) Duel.SelectTarget(tp,c7165085.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,e:GetHandler())
end end
function c7165085.activate(e,tp,eg,ep,ev,re,r,rp) function c7165085.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFaceup() then return end if not tc:IsRelateToEffect(e) or tc:IsFaceup() then
if c:IsRelateToEffect(e) then
c:CancelToGrave()
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
end
return
end
Duel.ConfirmCards(tp,tc) Duel.ConfirmCards(tp,tc)
if tc:IsType(TYPE_TRAP) then if tc:IsType(TYPE_TRAP) then
local te=tc:GetActivateEffect() local te=tc:GetActivateEffect()
...@@ -65,7 +72,6 @@ function c7165085.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,7 +72,6 @@ function c7165085.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
c:CancelToGrave() c:CancelToGrave()
Duel.SendtoDeck(c,nil,2,REASON_EFFECT) Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
......
...@@ -39,7 +39,7 @@ function c76895648.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +39,7 @@ function c76895648.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(1-tp,1,REASON_EFFECT) Duel.Draw(1-tp,1,REASON_EFFECT)
elseif dice==5 then elseif dice==5 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
else else
Duel.Destroy(e:GetHandler(),REASON_EFFECT) Duel.Destroy(e:GetHandler(),REASON_EFFECT)
......
...@@ -4,7 +4,7 @@ function c80885324.initial_effect(c) ...@@ -4,7 +4,7 @@ function c80885324.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(80885324,0)) e1:SetDescription(aux.Stringid(80885324,0))
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_START) e1:SetCode(EVENT_BATTLE_START)
e1:SetCondition(c80885324.descon) e1:SetCondition(c80885324.descon)
e1:SetTarget(c80885324.destg) e1:SetTarget(c80885324.destg)
......
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