Commit 36e69a12 authored by Nemo Ma's avatar Nemo Ma

fix

parent ecac0cfa
......@@ -95,12 +95,18 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
e1:SetOperation(cm.desop2)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e2,true)
local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3,true)
end
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local fd=e:GetLabel()
local tc=cm.GetCardsInZone(tp,fd)
return tc and eg:IsContains(tc)
return tc and eg:IsContains(tc) and (tc:IsStatus(STATUS_EFFECT_ENABLED) or tc:IsLocation(LOCATION_SZONE)) and not ((Duel.CheckEvent(EVENT_SUMMON_SUCCESS) or Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS)) and e:GetCode()==EVENT_MOVE and tc:IsLocation(LOCATION_MZONE))
end
function cm.desfilter(c,p,loc,seq)
local seq1=c:GetSequence()
......
......@@ -130,7 +130,6 @@ function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
return g:CheckSubGroup(cm.fselect,1,maxlink,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanSpecialSummonCount(tp,2) then return end
......@@ -147,15 +146,6 @@ function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=sg:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
tc=sg:GetNext()
end
Duel.SpecialSummonComplete()
......
......@@ -45,7 +45,7 @@ function cm.filter(c)
end
function cm.spfilter(c,e,tp,check)
return (c:IsCode(40009960) or aux.IsCodeListed(c,40009960) and c:IsType(TYPE_MONSTER)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (check or cm.DragonicOverlord(c)) and not c:IsCode(m)
and (check or c:IsCode(40009960)) and not c:IsCode(m)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......
......@@ -42,7 +42,7 @@ function cm.activate(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)
local rc=g:GetFirst()
if rc and Duel.SendtoHand(rc,nil,REASON_EFFECT)~=0 and rc:IsLocation(LOCATION_HAND) and bit.band(rc:GetCode(),40009960)>0 then
if rc and Duel.SendtoHand(rc,nil,REASON_EFFECT)~=0 and rc:IsLocation(LOCATION_HAND) and rc:GetCode()==40009960 then
Duel.ConfirmCards(1-tp,rc)
local g2=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
......
......@@ -78,11 +78,11 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then
if
Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 and
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil)
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 and Duel.IsExistingMatchingCard(cm.fthfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
local tg=Duel.SelectMatchingCard(tp,cm.fthfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
......
--卡通英雄 新宇侠
local m=60002102
local cm=_G["c"..m]
cm.name="卡通英雄 新宇侠"
function cm.initial_effect(c)
--cannot attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(cm.atklimit)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e3)
--direct attack
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_DIRECT_ATTACK)
e5:SetCondition(cm.dircon)
c:RegisterEffect(e5)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.spcon)
e3:SetCost(cm.spcost)
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())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function cm.dirfilter1(c)
return c:IsFaceup() and c:IsCode(15259703)
end
function cm.dirfilter2(c)
return c:IsFaceup() and c:IsType(TYPE_TOON)
end
function cm.dircon(e)
return Duel.IsExistingMatchingCard(cm.dirfilter1,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
and not Duel.IsExistingMatchingCard(cm.dirfilter2,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsCode(15259703)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
c:RegisterEffect(e1,true)
end
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
......@@ -53,6 +53,7 @@ function c79520001.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c79520001.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsCanOverlay,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()<=0 then return end
local og=g:Select(tp,1,1,nil)
......
......@@ -53,14 +53,14 @@ end
function c83000069.tgfilter(c)
return c:IsRace(RACE_ZOMBIE) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c83000069.spfilter(c,e,tp)
function c83000069.thfilter(c,e,tp)
return c:IsSetCard(0xbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c83000069.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(c83000069.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil)
return g:GetClassCount(Card.GetCode)>1
and Duel.IsExistingMatchingCard(c83000069.spfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(c83000069.thfilter,tp,LOCATION_DECK,0,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
......@@ -72,11 +72,12 @@ function c83000069.spop(e,tp,eg,ep,ev,re,r,rp)
local tg1=g:SelectSubGroup(tp,aux.dncheck,false,2,2)
if Duel.SendtoGrave(tg1,REASON_EFFECT)~=0 and tg1:IsExists(Card.IsLocation,2,nil,LOCATION_GRAVE)
then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c83000069.spfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local g=Duel.SelectMatchingCard(tp,c83000069.thfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function c83000069.thcon(e,tp,eg,ep,ev,re,r,rp)
......@@ -84,14 +85,16 @@ function c83000069.thcon(e,tp,eg,ep,ev,re,r,rp)
if tc:GetFlagEffectLabel(83000069)~=e:GetLabel() then
e:Reset()
return false
else return true end
else
return true
end
end
function c83000069.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT)
end
-----------
function c83000069.spfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsAttack(800) and c:IsDefense(1000) and and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsType(TYPE_MONSTER) and c:IsAttack(800) and c:IsDefense(1000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c83000069.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
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