Commit 39e11017 authored by Chen Bill's avatar Chen Bill

fix typos

parent 6b7f175a
......@@ -18,7 +18,7 @@ function c46232525.initial_effect(c)
c:RegisterEffect(e2)
end
function c46232525.tgfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(c46232525.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetRace(),mc)
return c:IsType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(c46232525.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetRace(),c)
end
function c46232525.spfilter(c,e,tp,race,mc)
return c:IsType(TYPE_FUSION) and c.material_race and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and race==c.material_race
......
......@@ -14,7 +14,7 @@ end
function c46271408.cfilter(c)
return c:GetSequence()<5
end
function c46271408.thfilter(c,e,tp)
function c46271408.thfilter(c,e,tp,spchk)
return c:IsSetCard(0x1115) and c:IsLevel(4) and (c:IsAbleToHand() or (spchk and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end
function c46271408.condition(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -35,7 +35,7 @@ function c47111934.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c47111934.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not c47111934.spcon(e,tp,eg,ep,ev,re,r,rp,0) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not c47111934.spcon(e,tp,eg,ep,ev,re,r,rp) then return end
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)>0 then
Duel.ConfirmCards(1-tp,c)
local e1=Effect.CreateEffect(c)
......
......@@ -31,7 +31,7 @@ function s.filter(c,tp)
and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)))
and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function s.dtftg(e,tp,eg,ep,ev,re,r,rp,chk)
function s.dtftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
......
......@@ -39,7 +39,7 @@ end
function c48372950.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x11a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c48372950.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
function c48372950.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c48372950.spfilter(chkc,e,tp) end
if chk==0 then return e:GetHandler():IsAbleToHand() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c48372950.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
......
......@@ -42,7 +42,7 @@ function c48806195.eqfilter(c,tp)
return (c:IsRace(RACE_REPTILE) or c:IsSetCard(0x179)) and c:IsType(TYPE_MONSTER) and c:CheckUniqueOnField(tp)
end
function c48806195.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c48806195.eqfilter(chkc,e,tp) and chkc:IsControler(tp) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c48806195.eqfilter(chkc,tp) and chkc:IsControler(tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c48806195.eqfilter,tp,LOCATION_GRAVE,0,1,nil,tp)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
......
......@@ -49,7 +49,7 @@ function c50005218.thop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
if g:IsExists(Card.IsSetCard,1,nil,0x115) then
if g:IsExists(c50005218.thfilter,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(50005218,2)) then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_ATOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:FilterSelect(tp,c50005218.thfilter,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
......
......@@ -41,7 +41,7 @@ function c50482813.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,ct)
if #g>0 then
Duel.DisableShuffleCheck()
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_ATOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sc=g:Select(tp,1,1,nil):GetFirst()
if sc:IsAbleToHand() then
Duel.SendtoHand(sc,nil,REASON_EFFECT)
......
......@@ -23,7 +23,7 @@ end
function c51227866.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local spchk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL)>=3
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and c51227866.filter(c,e,tp,spchk) end
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and c51227866.filter(chkc,e,tp,spchk) end
if chk==0 then return Duel.IsExistingTarget(c51227866.filter,tp,0,LOCATION_GRAVE,1,nil,e,tp,spchk) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c51227866.filter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp,spchk)
......
......@@ -8,10 +8,10 @@ function c51369889.initial_effect(c)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCost(c51369889.descost)
......@@ -38,7 +38,7 @@ function c51369889.descost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
end
function c51369889.destg(e,tp,eg,ep,ev,re,r,rp,chk)
function c51369889.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then
if e:GetLabel()==100 then
......
......@@ -35,7 +35,7 @@ function c52904476.filter(c,e,tp)
return c:IsSetCard(0x11f) and c:IsLevelBelow(4) and not c:IsCode(52904476)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c52904476.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
function c52904476.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c52904476.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c52904476.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_HAND,0,1,nil) end
......
......@@ -40,7 +40,7 @@ function c57111330.eqfilter(c,tp)
return (c:IsRace(RACE_PSYCHO) or c:IsSetCard(0x179)) and c:IsType(TYPE_MONSTER) and c:CheckUniqueOnField(tp)
end
function c57111330.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c57111330.eqfilter(chkc,e,tp) and chkc:IsControler(tp) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c57111330.eqfilter(chkc,tp) and chkc:IsControler(tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c57111330.eqfilter,tp,LOCATION_GRAVE,0,1,nil,tp)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
......
......@@ -44,7 +44,7 @@ function c57630503.op(e,tp,eg,ep,ev,re,r,rp)
if #g==1 and #hg==0 then
Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)
else
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_DISCARD)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local tg=hg:SelectSubGroup(tp,c57630503.gselect,false,1,2)
Duel.SendtoGrave(tg,REASON_DISCARD+REASON_EFFECT)
end
......
......@@ -76,7 +76,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
end
function s.spfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x1034) and c:GetOriginalType()&TYPE_MONSTER>0
and c:IsCanBeSpecialSummoned(e,0,sp,false,false) and c:GetSequence()<5
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:GetSequence()<5
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp)
......
......@@ -80,7 +80,7 @@ end
function c58811192.spfilter2(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x20b5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c58811192.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
function c58811192.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetMZoneCount(tp,e:GetHandler())>1
......
......@@ -22,7 +22,7 @@ function c65664792.initial_effect(c)
e2:SetOperation(c65664792.thop)
c:RegisterEffect(e2)
end
function c65664792.tdfilter(c,e,tp)
function c65664792.tdfilter(c)
return c:IsCode(12206212) and c:IsAbleToDeck()
end
function c65664792.spfilter(c,e,tp)
......@@ -43,12 +43,12 @@ function c65664792.spfilter3(c,e,tp,c1,c2)
and not c:IsOriginalCodeRule(c2:GetOriginalCodeRule())
end
function c65664792.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65664792.tdfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(c65664792.tdfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_MZONE)
end
function c65664792.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local dg=Duel.SelectMatchingCard(tp,c65664792.tdfilter,tp,LOCATION_ONFIELD,0,1,1,nil,e,tp,g)
local dg=Duel.SelectMatchingCard(tp,c65664792.tdfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
if #dg>0 and Duel.SendtoDeck(dg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>=3 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.IsExistingMatchingCard(c65664792.spfilter1,tp,LOCATION_HAND,0,1,nil,e,tp)
......
......@@ -60,7 +60,7 @@ function c67037924.cfilter(c,tp)
return c:IsSummonLocation(LOCATION_EXTRA) and c:IsSummonPlayer(1-tp)
end
function c67037924.setcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67037924.cfilter,1,nil,tp) and aux.exccon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67037924.cfilter,1,nil,tp) and aux.exccon(e)
end
function c67037924.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable() end
......
......@@ -70,7 +70,7 @@ end
function c69540484.rmcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_SPELL)
end
function c69540484.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
function c69540484.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToRemove(tp,POS_FACEDOWN) end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,3,nil,tp,POS_FACEDOWN)
and Duel.IsExistingMatchingCard(c69540484.rmcfilter,tp,LOCATION_MZONE,0,1,nil) end
......
......@@ -23,7 +23,6 @@ function c70916046.target(e,tp,eg,ep,ev,re,r,rp,chk)
local t={}
local i=1
for i=1,6 do t[i]=i end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NUMBER)
e:SetLabel(Duel.AnnounceNumber(tp,table.unpack(t)))
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,0)
......
......@@ -141,7 +141,7 @@ function c71159974.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c71159974.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
......
......@@ -57,7 +57,7 @@ function c71187462.tgop(e,tp,eg,ep,ev,re,r,rp)
local tg=g:SelectWithSumEqual(tp,Card.GetLevel,lv,1,99)
if #tg>0 then
tg:AddCard(c)
if Duel.SendtoGrave(tg,nil,REASON_EFFECT)>1 and tg:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) then
if Duel.SendtoGrave(tg,REASON_EFFECT)>1 and tg:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c71187462.sfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil)
if sg:GetCount()>0 then
......
......@@ -59,7 +59,7 @@ function c71595845.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71595845.tgfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil,TYPE_MONSTER) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DESTORY,nil,1,tp,LOCATION_MZONE+LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_MZONE+LOCATION_HAND)
end
function c71595845.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
......
......@@ -68,7 +68,7 @@ function c72329844.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end
Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST)
end
function c72329844.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
function c72329844.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
......
......@@ -72,7 +72,7 @@ function c72498838.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c72498838.rtfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SendtoGrave(g,nil,REASON_EFFECT+REASON_RETURN)
Duel.SendtoGrave(g,REASON_EFFECT+REASON_RETURN)
end
end
end
......
......@@ -50,13 +50,13 @@ end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsCostChecked()
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0x108a,TYPES_NORMAL_TRAP_MONSTER,400,2400,4,RACE_PLANT,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE,tp) end
and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x108a,TYPES_NORMAL_TRAP_MONSTER,400,2400,4,RACE_PLANT,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0x108a,TYPES_NORMAL_TRAP_MONSTER,400,2400,4,RACE_PLANT,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE,tp) then
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x108a,TYPES_NORMAL_TRAP_MONSTER,400,2400,4,RACE_PLANT,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE,tp) then
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_DEFENSE)
end
......
......@@ -38,7 +38,7 @@ function c75290703.eqfilter(c,tp)
return c:IsSetCard(0x179) and c:IsType(TYPE_MONSTER) and c:CheckUniqueOnField(tp)
end
function c75290703.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c75290703.eqfilter(chkc,e,tp) and chkc:IsControler(tp) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c75290703.eqfilter(chkc,tp) and chkc:IsControler(tp) end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and ft>0
and Duel.IsExistingTarget(c75290703.eqfilter,tp,LOCATION_GRAVE,0,1,nil,tp)
......
......@@ -17,7 +17,7 @@ function c76403456.target(e,tp,eg,ep,ev,re,r,rp,chk)
local val=math.ceil(Duel.GetBattleDamage(tp)/500)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,val)
and not Duel.IsPlayerAffectedByEffect(tp,EFFECT_AVOID_BATTLE_DAMAGE) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,g)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,0)
end
function c76403456.activate(e,tp,eg,ep,ev,re,r,rp)
local val=math.ceil(Duel.GetBattleDamage(tp)/500)
......
......@@ -70,7 +70,7 @@ end
function c82085295.thfilter(c)
return bit.band(c:GetType(),0x81)==0x81 and c:IsAbleToHand()
end
function c82085295.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
function c82085295.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c82085295.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c82085295.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
......@@ -29,7 +29,7 @@ function c82734805.con(e,tp,eg,ep,ev,re,r,rp)
end
function c82734805.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetLabel()
local con3,con5,con8,con10=nil
local con3,con5,con8,con10=nil,nil,nil,nil
if ct>=3 then
con3=Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_EXTRA,0,3,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_EXTRA,3,nil)
......
......@@ -42,7 +42,7 @@ function c83610035.eqfilter(c,tp)
return (c:IsRace(RACE_PLANT) or c:IsSetCard(0x179)) and c:IsType(TYPE_MONSTER) and c:CheckUniqueOnField(tp)
end
function c83610035.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c83610035.eqfilter(chkc,e,tp) and chkc:IsControler(tp) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c83610035.eqfilter(chkc,tp) and chkc:IsControler(tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c83610035.eqfilter,tp,LOCATION_GRAVE,0,1,nil,tp)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
......
......@@ -30,7 +30,7 @@ function c83723605.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_LMATERIAL)
and Duel.IsExistingTarget(c83723605.texfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
Duel.SelectTarget(tp,c83723605.texfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
local g=Duel.SelectTarget(tp,c83723605.texfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
......
......@@ -67,7 +67,7 @@ function s.mfilter(c)
return seq<=4 and c:IsType(TYPE_EFFECT) and c:IsFaceup()
end
function s.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cgkc:IsControler(1-tp) and s.mfilter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.mfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.mfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2))
......
......@@ -42,7 +42,7 @@ function c84332527.eqfilter(c,tp)
return (c:IsRace(RACE_WARRIOR) or c:IsSetCard(0x179)) and c:IsType(TYPE_MONSTER) and c:CheckUniqueOnField(tp)
end
function c84332527.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c84332527.eqfilter(chkc,e,tp) and chkc:IsControler(tp) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c84332527.eqfilter(chkc,tp) and chkc:IsControler(tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c84332527.eqfilter,tp,LOCATION_GRAVE,0,1,nil,tp)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
......
......@@ -58,7 +58,7 @@ function c85032782.tdfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
and Duel.IsExistingMatchingCard(c85032782.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil)
end
function c85032782.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
function c85032782.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c85032782.tdfilter(chkc,tp) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c85032782.tdfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
......
......@@ -77,8 +77,8 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) or Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==0 or not c:IsLocation(LOCATION_EXTRA) then return end
local attr=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if not attr or attr==0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+o,0x13f,TYPES_TOKEN_MONSTER,0,0,4,RACE_FIEND,a,POS_FACEUP_DEFENSE,tp)
or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+o,0x13f,TYPES_TOKEN_MONSTER,0,0,4,RACE_FIEND,a,POS_FACEUP_DEFENSE,1-tp)
or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+o,0x13f,TYPES_TOKEN_MONSTER,0,0,4,RACE_FIEND,attr,POS_FACEUP_DEFENSE,tp)
or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+o,0x13f,TYPES_TOKEN_MONSTER,0,0,4,RACE_FIEND,attr,POS_FACEUP_DEFENSE,1-tp)
or Duel.GetMZoneCount(tp,c)<=0 or Duel.GetMZoneCount(1-tp,c,tp)<=0
or Duel.IsPlayerAffectedByEffect(tp,59822133) then
return
......
......@@ -82,7 +82,7 @@ end
function c88693151.thfilter(c)
return c:IsSetCard(0xfb) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c88693151.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
function c88693151.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c88693151.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c88693151.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
......@@ -57,7 +57,7 @@ end
function c90126061.mtfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end
function c90126061.mttg(e,tp,eg,ep,ev,re,r,rp,chk)
function c90126061.mttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c90126061.mtfilter(chkc) end
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingTarget(c90126061.mtfilter,tp,LOCATION_GRAVE,0,1,nil) end
......@@ -72,7 +72,7 @@ function c90126061.mtop(e,tp,eg,ep,ev,re,r,rp)
Duel.Overlay(c,Group.FromCards(tc))
end
end
function c90126061.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
function c90126061.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToDeck() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,1-tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
......
......@@ -23,7 +23,7 @@ function c97053215.spfilter(c,e,tp,ft)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsSummonableCard()
and (c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end
function c97053215.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
function c97053215.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c97053215.spfilter(chkc,e,tp,ft) end
if chk==0 then return Duel.IsExistingTarget(c97053215.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,ft) end
......
......@@ -44,7 +44,7 @@ end
function c97518132.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c97518132.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
function c97518132.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
......
......@@ -14,7 +14,7 @@ function c99092624.initial_effect(c)
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_TODECK+CATEGORY_LEAVE_GRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_EFFECT)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,99092624)
e2:SetTarget(c99092624.tdtg)
......
......@@ -57,8 +57,7 @@ end
function c99274184.discon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and tg:IsExists(c99274184.tgfilter,1,nil,tp) and Duel.IsChainDisablable(ev)
and aux.exccon(e,tp,eg,ep,ev,re,r,rp)
return tg and tg:IsExists(c99274184.tgfilter,1,nil,tp) and Duel.IsChainDisablable(ev) and aux.exccon(e)
end
function c99274184.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true 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