Commit aa10ee12 authored by Nemo Ma's avatar Nemo Ma

fix

parent 4f31dc31
......@@ -68,7 +68,7 @@ function cm.tgfilter(c,e,tp,ft)
return c:IsFaceup() and (ft>0 or c:GetSequence()<5) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode(),c:GetLeftScale(),c:GetRightScale(),c:GetRace())
end
function cm.spfilter(c,e,tp,code,lse,rse,rac)
return c:IsRace(rac) and c:GetLeftScale()==lse and c:GetRightScale()==rse and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and not c:IsCode(code)
return c:IsRace(rac) and c:GetLeftScale()==lse and c:GetRightScale()==rse and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and c:IsType(TYPE_PENDULUM) and not c:IsCode(code)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tp=e:GetHandlerPlayer()
......
This diff is collapsed.
This diff is collapsed.
--《力量》·索菲娜
local m=60001248
local cm=_G["c"..m]
function cm.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--effect
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,0))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_BATTLE_DESTROYING)
e5:SetCondition(aux.bdocon)
e5:SetTarget(cm.efftg)
e5:SetOperation(cm.effop)
c:RegisterEffect(e5)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetValue(-10000000)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function cm.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b2=c:GetFlagEffect(m)==0
local b3=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
if chk==0 then return true end
local op=0
if b2 and b3 then
op=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2),aux.Stringid(m,3))
elseif b2 then
op=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2))
elseif b3 then
op=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,3))*2
else
op=Duel.SelectOption(tp,aux.Stringid(m,1))
end
e:SetLabel(op)
end
function cm.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local op=e:GetLabel()
if op==0 then
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
elseif op==1 then
if c:IsFaceup() and c:IsRelateToEffect(e) then
local tct=0
if Duel.GetTurnPlayer()==tp then tct=1 end
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetCondition(cm.eacon)
e1:SetLabel(Duel.GetTurnCount())
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,1+tct)
c:RegisterEffect(e1)
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,0,1+tct)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
end
function cm.eacon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetLabel()
end
\ No newline at end of file
......@@ -45,7 +45,7 @@ function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
function cm.penfilter(c)
return c:IsSetCard(0x62c) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
return c:IsSetCard(0x62c) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() and not c:IsCode(m)
end
function cm.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDestructable()
......
......@@ -24,7 +24,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.penfilter(c)
return c:IsSetCard(0x62c) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
return c:IsSetCard(0x62c) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() and not c:IsCode(m)
end
function cm.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDestructable()
......
......@@ -3,6 +3,7 @@ local m=60002098
local cm=_G["c"..m]
cm.name="卡通暗黑人偶 妮可罗菲娅"
function cm.initial_effect(c)
aux.AddCodeList(c,15259703)
c:EnableReviveLimit()
--cannot attack
local e1=Effect.CreateEffect(c)
......
......@@ -3,6 +3,7 @@ local m=60002099
local cm=_G["c"..m]
cm.name="卡通英雄 羽翼侠"
function cm.initial_effect(c)
aux.AddCodeList(c,15259703)
--cannot attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......
......@@ -3,6 +3,7 @@ local m=60002102
local cm=_G["c"..m]
cm.name="卡通英雄 新宇侠"
function cm.initial_effect(c)
aux.AddCodeList(c,15259703)
--cannot attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......@@ -33,6 +34,16 @@ function cm.initial_effect(c)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.atklimit(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
......@@ -77,4 +88,24 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
c:RegisterEffect(e1,true)
end
end
\ No newline at end of file
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function cm.filter(c)
return c:IsCode(24094653) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
......@@ -3,6 +3,7 @@ local m=60002103
local cm=_G["c"..m]
cm.name="卡通英雄 新宇侠"
function cm.initial_effect(c)
aux.AddCodeList(c,15259703)
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x62),aux.FilterBoolFunction(Card.IsCode,60002099),true)
--cannot attack
......
......@@ -77,7 +77,7 @@ function cm.imcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.efilter(e,te)
return te:IsActiveType(TYPE_TRAP)
return te:IsActiveType(TYPE_TRAP) or te:IsActiveType(TYPE_SPELL)
end
function cm.setcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
......
......@@ -3,6 +3,7 @@ local m=60002110
local cm=_G["c"..m]
cm.name="卡通城市"
function cm.initial_effect(c)
aux.AddCodeList(c,15259703)
--code
aux.EnableChangeCode(c,15259703,LOCATION_FZONE)
--Activate
......
......@@ -3,6 +3,7 @@ local m=60002111
local cm=_G["c"..m]
cm.name="卡通防火墙龙"
function cm.initial_effect(c)
aux.AddCodeList(c,15259703)
--link summon
aux.AddLinkProcedure(c,cm.fil,2)
c:EnableReviveLimit()
......
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
--To Hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,m)
......
......@@ -37,8 +37,8 @@ function s.cfilter2(c,ec,tp)
return c:IsFaceup() and c:IsCanTurnSet() and Duel.CheckReleaseGroupEx(tp,Card.IsSetCard,1,Group.FromCards(c,ec),0x2b)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,s.cfilter,1,e:GetHandler()) end
local g=Duel.SelectReleaseGroupEx(tp,s.cfilter,1,1,e:GetHandler())
if chk==0 then return Duel.CheckReleaseGroupEx(tp,s.cfilter,1,e:GetHandler(),tp) end
local g=Duel.SelectReleaseGroupEx(tp,s.cfilter,1,1,e:GetHandler(),tp)
Duel.Release(g,REASON_COST)
end
function s.filter(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