Commit 754920d3 authored by Nemo Ma's avatar Nemo Ma

fix

parent 7bbdebf5
...@@ -34,7 +34,7 @@ function cm.eqlimit(e,c) ...@@ -34,7 +34,7 @@ function cm.eqlimit(e,c)
return e:GetOwner()==c return e:GetOwner()==c
end end
function cm.equipfd(c,tp,tc) function cm.equipfd(c,tp,tc)
if tc:IsPosition(POS_FACEUP) then Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEDOWN,false) return true end if tc:IsPosition(POS_FACEUP) then return Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEDOWN,false) end
if not Duel.Equip(tp,tc,c,false) then return false end if not Duel.Equip(tp,tc,c,false) then return false end
--Add Equip limit --Add Equip limit
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0) tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0)
...@@ -93,6 +93,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -93,6 +93,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and e:IsHasCategory(CATEGORY_HANDES) then if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and e:IsHasCategory(CATEGORY_HANDES) then
Duel.BreakEffect()
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end end
end end
\ No newline at end of file
...@@ -12,6 +12,19 @@ function c29038040.initial_effect(c) ...@@ -12,6 +12,19 @@ function c29038040.initial_effect(c)
e3:SetTarget(c29038040.sptg) e3:SetTarget(c29038040.sptg)
e3:SetOperation(c29038040.spop) e3:SetOperation(c29038040.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--atk
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(TIMING_DAMAGE_STEP)
e2:SetCountLimit(1,29038041)
e2:SetCondition(c29038040.atkcon)
e2:SetTarget(c29038040.atktg)
e2:SetOperation(c29038040.atkop)
c:RegisterEffect(e2)
end end
function c29038040.filter(c,e,tp) function c29038040.filter(c,e,tp)
return (c:IsCode(c,29065500,29065502) or aux.IsCodeListed(c,29065500) or aux.IsCodeListed(c,29065502)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return (c:IsCode(c,29065500,29065502) or aux.IsCodeListed(c,29065500) or aux.IsCodeListed(c,29065502)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
...@@ -29,4 +42,41 @@ function c29038040.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,4 +42,41 @@ function c29038040.spop(e,tp,eg,ep,ev,re,r,rp)
if tc then if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file function c29038040.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
end
function c29038040.atkfilter(c)
return c:IsFaceup() and c:IsCode(29065578)
end
function c29038040.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c29038040.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function c29038040.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,c29038040.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.HintSelection(g)
local tc=g:GetFirst()
if tc then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(tc:GetAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetValue(1)
e2:SetCondition(c29038040.actcon)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
function c29038040.actcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end
...@@ -19,10 +19,6 @@ function cm.initial_effect(c) ...@@ -19,10 +19,6 @@ function cm.initial_effect(c)
e2:SetCondition(cm.con2) e2:SetCondition(cm.con2)
e2:SetOperation(cm.op2) e2:SetOperation(cm.op2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD) e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
...@@ -44,7 +40,7 @@ end ...@@ -44,7 +40,7 @@ end
function cm.con2(e,c) function cm.con2(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):IsExists(Card.IsCode,1,nil,29056009) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):IsExists(Card.IsCode,1,nil,29038040,29056009)
and Duel.IsCanRemoveCounter(tp,1,0,0x10ae,1,REASON_COST) and Duel.IsCanRemoveCounter(tp,1,0,0x10ae,1,REASON_COST)
end end
function cm.op2(e,tp,eg,ep,ev,re,r,rp,c) function cm.op2(e,tp,eg,ep,ev,re,r,rp,c)
...@@ -56,5 +52,5 @@ function cm.con4(e) ...@@ -56,5 +52,5 @@ function cm.con4(e)
end end
--e5 --e5
function cm.con5(e) function cm.con5(e)
return not Duel.GetMatchingGroup(Card.IsFaceup,e:GetHandler():GetControler(),LOCATION_MZONE,0,nil):IsExists(Card.IsCode,1,nil,29056009) return not Duel.GetMatchingGroup(Card.IsFaceup,e:GetHandler():GetControler(),LOCATION_MZONE,0,nil):IsExists(Card.IsCode,1,nil,29038040,29056009)
end end
\ No newline at end of file
...@@ -29,15 +29,15 @@ function c67200272.initial_effect(c) ...@@ -29,15 +29,15 @@ function c67200272.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c67200272.scfilter1(c,e,tp) function c67200272.scfilter1(c,e,tp)
return c:IsSetCard(0x674) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsFaceup() and c:IsSetCard(0x674) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
function c67200272.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c67200272.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and c67200272.scfilter1(chkc,e,tp,c) end if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c67200272.scfilter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c67200272.scfilter1,tp,LOCATION_SZONE,0,1,nil,e,tp,c) end and Duel.IsExistingTarget(c67200272.scfilter1,tp,LOCATION_SZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c67200272.scfilter1,tp,LOCATION_SZONE,0,1,1,nil,e,tp,c) local g=Duel.SelectTarget(tp,c67200272.scfilter1,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c67200272.scop(e,tp,eg,ep,ev,re,r,rp) function c67200272.scop(e,tp,eg,ep,ev,re,r,rp)
...@@ -47,13 +47,15 @@ function c67200272.scop(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,13 +47,15 @@ function c67200272.scop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1,true)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e2) e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2,true)
end end
if Duel.SpecialSummonComplete()==0 then return end Duel.SpecialSummonComplete()
end end
-- --
function c67200272.spfilter(c,e,tp) function c67200272.spfilter(c,e,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