Commit c1194f8b authored by VanillaSalt's avatar VanillaSalt

Merge pull request #1039 from DailyShana/patch-16

fix
parents ace89634 6f8447f7
...@@ -62,7 +62,7 @@ function c1003840.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,7 +62,7 @@ function c1003840.thcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c1003840.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c1003840.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToDeck() end if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToDeck() end
if chk==0 then return true end if chk==0 then return e:GetHandler():IsRelateToEffect(e) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
......
...@@ -10,18 +10,20 @@ function c8529136.initial_effect(c) ...@@ -10,18 +10,20 @@ function c8529136.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c8529136.filter(c) function c8529136.filter(c)
return c:IsFaceup() and c:IsCode(60800381) return c:IsFaceup() and c:IsCode(60800381) and c:GetFlagEffect(8529136)==0
end end
function c8529136.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c8529136.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c8529136.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c8529136.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c8529136.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return bit.band(Duel.GetCurrentPhase(),0xc0)==0
and Duel.IsExistingTarget(c8529136.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c8529136.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c8529136.filter,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c8529136.activate(e,tp,eg,ep,ev,re,r,rp) function c8529136.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:GetFlagEffect(8529136)==0 then
tc:RegisterFlagEffect(8529136,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END,0,1)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
...@@ -35,6 +37,7 @@ function c8529136.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,6 +37,7 @@ function c8529136.activate(e,tp,eg,ep,ev,re,r,rp)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE) e2:SetCode(EFFECT_PIERCE)
e2:SetCondition(c8529136.con)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -47,12 +50,13 @@ function c8529136.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,12 +50,13 @@ function c8529136.activate(e,tp,eg,ep,ev,re,r,rp)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetCondition(c8529136.con)
e4:SetValue(1) e4:SetValue(1)
e4:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e4:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e4) tc:RegisterEffect(e4)
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_DESTROY) e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_DAMAGE_STEP_END) e5:SetCode(EVENT_DAMAGE_STEP_END)
e5:SetCondition(c8529136.descon) e5:SetCondition(c8529136.descon)
e5:SetTarget(c8529136.destg) e5:SetTarget(c8529136.destg)
...@@ -62,20 +66,23 @@ function c8529136.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,20 +66,23 @@ function c8529136.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c8529136.actcon(e) function c8529136.actcon(e)
return e:GetHandler():GetBattleTarget()~=nil return e:GetHandler():GetBattleTarget()~=nil and e:GetHandler():GetControler()==e:GetOwnerPlayer()
end end
function c8529136.aclimit(e,re,tp) function c8529136.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e) return not re:GetHandler():IsImmuneToEffect(e)
end end
function c8529136.con(e)
return e:GetHandler():GetControler()==e:GetOwnerPlayer()
end
function c8529136.damcon(e,tp,eg,ep,ev,re,r,rp) function c8529136.damcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and e:GetHandler():GetBattleTarget()~=nil return ep~=tp and e:GetHandler():GetBattleTarget()~=nil and e:GetHandler():GetControler()==e:GetOwnerPlayer()
end end
function c8529136.damop(e,tp,eg,ep,ev,re,r,rp) function c8529136.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*2) Duel.ChangeBattleDamage(ep,ev*2)
end end
function c8529136.descon(e,tp,eg,ep,ev,re,r,rp) function c8529136.descon(e,tp,eg,ep,ev,re,r,rp)
local d=e:GetHandler():GetBattleTarget() local d=e:GetHandler():GetBattleTarget()
return d and d:IsRelateToBattle() return d and d:IsRelateToBattle() and e:GetHandler():GetControler()==e:GetOwnerPlayer()
end end
function c8529136.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c8529136.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetBattleTarget() local tc=e:GetHandler():GetBattleTarget()
......
...@@ -13,12 +13,16 @@ function c95376428.initial_effect(c) ...@@ -13,12 +13,16 @@ function c95376428.initial_effect(c)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetCondition(c95376428.condition) e2:SetCondition(c95376428.condition)
e2:SetTarget(c95376428.target)
e2:SetOperation(c95376428.operation) e2:SetOperation(c95376428.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c95376428.condition(e,tp,eg,ep,ev,re,r,rp) function c95376428.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsPreviousLocation,1,nil,LOCATION_EXTRA) return eg:IsExists(Card.IsPreviousLocation,1,nil,LOCATION_EXTRA)
end end
function c95376428.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e) end
end
function c95376428.filter(c,tp) function c95376428.filter(c,tp)
return c:GetSummonPlayer()==tp return c:GetSummonPlayer()==tp
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