Commit a5b89dd2 authored by salix5's avatar salix5

fix

parent c14be33e
...@@ -29,7 +29,7 @@ function c1580833.initial_effect(c) ...@@ -29,7 +29,7 @@ function c1580833.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c1580833.filter(c,tp) function c1580833.filter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsOnField() and c:IsSetCard(0xd8) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(0xd8)
and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp)) and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp))
end end
function c1580833.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c1580833.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -9,9 +9,10 @@ function c368382.initial_effect(c) ...@@ -9,9 +9,10 @@ function c368382.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- --
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(368382,0))
e2:SetCategory(CATEGORY_DISABLE) e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_PZONE) e2:SetRange(LOCATION_PZONE)
e2:SetCondition(c368382.negcon) e2:SetCondition(c368382.negcon)
e2:SetOperation(c368382.negop) e2:SetOperation(c368382.negop)
...@@ -26,16 +27,15 @@ function c368382.initial_effect(c) ...@@ -26,16 +27,15 @@ function c368382.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c368382.tfilter(c,tp) function c368382.tfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xd8) and c:IsControler(tp) and c:IsOnField() return c:IsFaceup() and c:IsSetCard(0xd8) and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD)
end end
function c368382.negcon(e,tp,eg,ep,ev,re,r,rp) function c368382.negcon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not e:GetHandler():GetFlagEffect(368382)==0 then return end return e:GetHandler():GetFlagEffect(368382)==0 and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) and g and g:IsExists(c368382.tfilter,1,e:GetHandler(),tp) and Duel.IsChainDisablable(ev)
return g and g:IsExists(c368382.tfilter,1,e:GetHandler(),tp) and Duel.IsChainDisablable(ev)
end end
function c368382.negop(e,tp,eg,ep,ev,re,r,rp) function c368382.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(368382,0)) then if Duel.SelectYesNo(tp,aux.Stringid(368382,1)) then
e:GetHandler():RegisterFlagEffect(368382,RESET_EVENT+0x1fe0000,0,1) e:GetHandler():RegisterFlagEffect(368382,RESET_EVENT+0x1fe0000,0,1)
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -26,7 +26,7 @@ function c37752990.initial_effect(c) ...@@ -26,7 +26,7 @@ function c37752990.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c37752990.filter(c,tp) function c37752990.filter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsOnField() and c:IsSetCard(0xd8) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(0xd8)
and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp)) and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp))
end end
function c37752990.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c37752990.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -9,9 +9,10 @@ function c38988538.initial_effect(c) ...@@ -9,9 +9,10 @@ function c38988538.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- --
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(38988538,0))
e2:SetCategory(CATEGORY_DISABLE) e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_PZONE) e2:SetRange(LOCATION_PZONE)
e2:SetCondition(c38988538.negcon) e2:SetCondition(c38988538.negcon)
e2:SetOperation(c38988538.negop) e2:SetOperation(c38988538.negop)
...@@ -33,16 +34,15 @@ function c38988538.initial_effect(c) ...@@ -33,16 +34,15 @@ function c38988538.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c38988538.tfilter(c,tp) function c38988538.tfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xd8) and c:IsControler(tp) and c:IsOnField() return c:IsFaceup() and c:IsSetCard(0xd8) and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD)
end end
function c38988538.negcon(e,tp,eg,ep,ev,re,r,rp) function c38988538.negcon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not e:GetHandler():GetFlagEffect(38988538)==0 then return end return e:GetHandler():GetFlagEffect(38988538)==0 and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) and g and g:IsExists(c38988538.tfilter,1,e:GetHandler(),tp) and Duel.IsChainDisablable(ev)
return g and g:IsExists(c38988538.tfilter,1,e:GetHandler(),tp) and Duel.IsChainDisablable(ev)
end end
function c38988538.negop(e,tp,eg,ep,ev,re,r,rp) function c38988538.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(38988538,0)) then if Duel.SelectYesNo(tp,aux.Stringid(38988538,1)) then
e:GetHandler():RegisterFlagEffect(38988538,RESET_EVENT+0x1fe0000,0,1) e:GetHandler():RegisterFlagEffect(38988538,RESET_EVENT+0x1fe0000,0,1)
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -9,16 +9,16 @@ function c63251695.initial_effect(c) ...@@ -9,16 +9,16 @@ function c63251695.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- --
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(63251695,0))
e2:SetCategory(CATEGORY_DISABLE) e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_PZONE) e2:SetRange(LOCATION_PZONE)
e2:SetCondition(c63251695.negcon) e2:SetCondition(c63251695.negcon)
e2:SetOperation(c63251695.negop) e2:SetOperation(c63251695.negop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
-- --
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(63251695,0))
e3:SetCategory(CATEGORY_TODECK) e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DAMAGE_STEP_END) e3:SetCode(EVENT_DAMAGE_STEP_END)
...@@ -29,13 +29,12 @@ function c63251695.initial_effect(c) ...@@ -29,13 +29,12 @@ function c63251695.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c63251695.tfilter(c,tp) function c63251695.tfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xd8) and c:IsControler(tp) and c:IsOnField() return c:IsFaceup() and c:IsSetCard(0xd8) and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD)
end end
function c63251695.negcon(e,tp,eg,ep,ev,re,r,rp) function c63251695.negcon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not e:GetHandler():GetFlagEffect(63251695)==0 then return end return e:GetHandler():GetFlagEffect(63251695)==0 and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) and g and g:IsExists(c63251695.tfilter,1,e:GetHandler(),tp) and Duel.IsChainDisablable(ev)
return g and g:IsExists(c63251695.tfilter,1,e:GetHandler(),tp) and Duel.IsChainDisablable(ev)
end end
function c63251695.negop(e,tp,eg,ep,ev,re,r,rp) function c63251695.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(63251695,1)) then if Duel.SelectYesNo(tp,aux.Stringid(63251695,1)) then
...@@ -87,22 +86,24 @@ function c63251695.effop(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,22 +86,24 @@ function c63251695.effop(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE_CAL) e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE_CAL)
c:RegisterEffect(e2) c:RegisterEffect(e2)
else else
local g1=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,nil) local g1=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_HAND,nil)
local g2=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_HAND,nil) local g2=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,nil)
local opt=0 local opt=0
if g1:GetCount()>0 and g2:GetCount()>0 then if g1:GetCount()>0 and g2:GetCount()>0 then
opt=Duel.SelectOption(tp,aux.Stringid(63251695,4),aux.Stringid(63251695,5)) opt=Duel.SelectOption(tp,aux.Stringid(63251695,4),aux.Stringid(63251695,5))
elseif g1:GetCount()>0 then elseif g1:GetCount()>0 then
opt=0 opt=0
else elseif g2:GetCount()>0 then
opt=1 opt=1
else
return
end end
local sg=nil local sg=nil
if opt==0 then if opt==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) sg=g1:RandomSelect(tp,1)
sg=g1:Select(tp,1,1,nil)
else else
sg=g2:RandomSelect(tp,1) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
sg=g2:Select(tp,1,1,nil)
end end
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
if sg:GetFirst():IsLocation(LOCATION_DECK) and c:IsRelateToEffect(e) and c:IsFaceup() then if sg:GetFirst():IsLocation(LOCATION_DECK) and c:IsRelateToEffect(e) and c:IsFaceup() then
......
...@@ -29,7 +29,7 @@ function c64973287.initial_effect(c) ...@@ -29,7 +29,7 @@ function c64973287.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c64973287.repfilter(c,tp) function c64973287.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsOnField() and c:IsSetCard(0xd8) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(0xd8)
and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp)) and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp))
end end
function c64973287.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c64973287.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
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