Commit 6d75568e authored by Nemo Ma's avatar Nemo Ma

fix

parent d1014c92
...@@ -33,12 +33,12 @@ function cm.initial_effect(c) ...@@ -33,12 +33,12 @@ function cm.initial_effect(c)
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON) e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_QUICK_O) e5:SetType(EFFECT_TYPE_QUICK_O)
e5;SetProperty(EFFECT_FLAG_CARD_TARGET) e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetCode(EVENT_FREE_CHAIN) e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_EXTRA) e5:SetRange(LOCATION_EXTRA)
e5:SetTarget(cm.sptg) --e5:SetTarget(cm.sptg)
e5:SetOperation(cm.spop) e5:SetOperation(cm.spop)
c:RegisterEffect(e5) --c:RegisterEffect(e5)
end end
function cm.atkfilter(c) function cm.atkfilter(c)
return c:IsSetCard(0x310) and c:GetAttack()>=0 return c:IsSetCard(0x310) and c:GetAttack()>=0
......
...@@ -29,8 +29,8 @@ function c33400502.cnfilter(c) ...@@ -29,8 +29,8 @@ function c33400502.cnfilter(c)
return c:IsSetCard(0x6341) and c:IsFaceup() return c:IsSetCard(0x6341) and c:IsFaceup()
end end
function c33400502.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c33400502.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) or Duel.IsExistingMatchingCard(cm.cnfilter,tp,LOCATION_ONFIELD,0,1,nil) end if chk==0 then return Duel.CheckLPCost(tp,1000) or Duel.IsExistingMatchingCard(c33400502.cnfilter,tp,LOCATION_ONFIELD,0,1,nil) end
if not Duel.IsExistingMatchingCard(cm.cnfilter,tp,LOCATION_ONFIELD,0,1,nil)then Duel.PayLPCost(tp,1000) if not Duel.IsExistingMatchingCard(c33400502.cnfilter,tp,LOCATION_ONFIELD,0,1,nil)then Duel.PayLPCost(tp,1000)
end end
end end
......
...@@ -21,7 +21,7 @@ function c77770020.initial_effect(c) ...@@ -21,7 +21,7 @@ function c77770020.initial_effect(c)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMINGS_CHECK_MONSTER+TIMING_DAMAGE_STEP+TIMING_END_PHASE) e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMINGS_CHECK_MONSTER+TIMING_DAMAGE_STEP+TIMING_END_PHASE)
e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,777700200) e2:SetCountLimit(1,777700200)
e2:SetCost(c77770020.atkcost) e2:SetCost(c77770020.atkcost)
e2:SetTarget(c77770020.atktg) e2:SetTarget(c77770020.atktg)
...@@ -32,16 +32,19 @@ function c77770020.addcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -32,16 +32,19 @@ function c77770020.addcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end end
function c77770020.addtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c77770020.addfilter(c)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end return c:IsFaceup() and (c:IsAttackAbove(1) or aux.disfilter1(c))
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) function c77770020.addtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(c77770020.addfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end end
function c77770020.addop(e,tp,eg,ep,ev,re,r,rp) function c77770020.addop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
if tc:IsFaceup() and tc:IsRelateToEffect(e) then local g=Duel.SelectMatchingCard(tp,c77770020.addfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(g)
local tc=g:GetFirst()
if tc 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)
...@@ -72,16 +75,16 @@ function c77770020.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -72,16 +75,16 @@ function c77770020.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST) Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end end
function c77770020.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c77770020.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end end
function c77770020.atkop(e,tp,eg,ep,ev,re,r,rp) function c77770020.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
if tc:IsRelateToEffect(e) and tc:IsFaceup() then local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(g)
local tc=g:GetFirst()
if tc 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)
......
...@@ -8,13 +8,17 @@ function cm.initial_effect(c) ...@@ -8,13 +8,17 @@ function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m) c:SetUniqueOnField(1,0,m)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_EXTRA) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DRAW_PHASE) e1:SetHintTiming(TIMING_DRAW_PHASE)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_DUEL) e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_DUEL)
e1:SetCost(aux.bfgcost) e1:SetCost(aux.bfgcost)
e1:SetOperation(cm.op) e1:SetOperation(cm.op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetRange(LOCATION_EXTRA)
e3:SetCondition(cm.con)
c:RegisterEffect(e3)
--atk --atk
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetCategory(CATEGORY_ATKCHANGE)
...@@ -24,6 +28,9 @@ function cm.initial_effect(c) ...@@ -24,6 +28,9 @@ function cm.initial_effect(c)
e2:SetOperation(cm.atkop) e2:SetOperation(cm.atkop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
......
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