Commit 28db6972 authored by TanakaKotoha's avatar TanakaKotoha

Suit

parent 41eb88cc
No preview for this file type
--悖论寄生者·突触
local m=14000034
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c14000501") end,function() require("script/c14000501") end)
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.FilterBoolFunction(Card.IsCode,14000021),1,1)
......@@ -86,7 +85,7 @@ function cm.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO+1
end
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and (re:IsActiveType(TYPE_SPELL) or re:GetHandler():IsType(TYPE_SPELL) or spo.named(re:GetHandler()))
return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and (re:IsActiveType(TYPE_SPELL) or re:GetHandler():IsType(TYPE_SPELL))
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 end
......@@ -106,7 +105,7 @@ function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.stcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and (re:IsActiveType(TYPE_TRAP) or re:GetHandler():IsType(TYPE_TRAP) or spo.named(re:GetHandler()))
return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and (re:IsActiveType(TYPE_TRAP) or re:GetHandler():IsType(TYPE_TRAP))
end
function cm.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 end
......
......@@ -90,9 +90,9 @@ function cm.sop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(tc,1,tp,tp,false,false,POS_FACEUP)
local code=tc:GetOriginalCodeRule()
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(code,0))
tc:RegisterFlagEffect(code,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(code,0))
end
else
Duel.SendtoGrave(tc,REASON_EFFECT)
......
......@@ -45,7 +45,7 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
e1:SetValue(atk)
c:RegisterEffect(e1)
local e2=e1:Clone()
......
......@@ -21,7 +21,7 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetRange(LOCATION_SZONE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(cm.rccon)
e2:SetValue(aux.tgoval)
......
--简线生物的二维平面家
function c21520259.initial_effect(c)
end
......@@ -30,7 +30,7 @@ function cm.initial_effect(c)
e2:SetHintTiming(TIMING_MAIN_END)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.askcon)
e2:SetCost(cm.atkcost)
e2:SetCost(cm.askcost)
e2:SetOperation(cm.askop)
c:RegisterEffect(e2)
--multiatk
......@@ -79,8 +79,8 @@ function cm.costfilter(c)
return aux.IsCodeListed(c,26818001) and c:IsType(TYPE_MONSTER) and (c:IsControler(tp) or c:IsFaceup())
end
function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil) end
local sg=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.costfilter,1,e:GetHandler()) end
local sg=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,e:GetHandler())
Duel.Release(sg,REASON_COST)
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -102,6 +102,11 @@ function cm.askcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
return Duel.IsAbleToEnterBP() and Duel.GetTurnPlayer()==1-tp
end
function cm.askcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil) end
local sg=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil)
Duel.Release(sg,REASON_COST)
end
function cm.askop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
......
......@@ -45,7 +45,7 @@ function c30557011.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-down)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
if preatk~=0 and tc:IsAttack(0) then dg1:AddCard(tc) end
if tc:IsAttack(preatk) then dg2:AddCard(tc) end
......
--天使-冰结傀儡
function c33400502.initial_effect(c)
c:SetUniqueOnField(1,0,33400502)
--atc
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
......
......@@ -13,7 +13,7 @@ function c47530140.initial_effect(c)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
......
......@@ -45,6 +45,7 @@ function c47530962.bstg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,1,1,0,0)
end
function c47530962.bsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
......@@ -61,7 +62,7 @@ function c47530962.bsop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c47530962.ntdcon(e,tp,eg,ep,ev,re,r,rp)
return tp:GetLP()<=4000
return Duel.GetLP(tp)<=4000
end
function c47530962.ntdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -24,13 +24,13 @@ function c75646065.initial_effect(c)
c:RegisterEffect(e4)
end
function c75646065.lkfilter(c)
return c:IsLinkSetCard(0x2c0) or c::IsLinkSetCard(0xa2c2)
return c:IsLinkSetCard(0x2c0) or c:IsLinkSetCard(0xa2c2)
end
function c75646065.lcheck(g,lc)
return g:IsExists(c75646065.lkfilter,1)
end
function c75646065.filter(c)
return (c:IsLinkSetCard(0x2c0) or c::IsLinkSetCard(0xa2c2)) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsAbleToDeck()
return (c:IsSetCard(0x2c0) or c:IsSetCard(0xa2c2)) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsAbleToDeck()
end
function c75646065.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c75646065.filter(chkc) end
......
......@@ -40,11 +40,10 @@ end
function c81011003.imcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetLinkedGroup():IsExists(c81011003.tgfilter,1,nil)
end
function c81011003.efilter(e,re)
if re:GetOwnerPlayer()==e:GetOwnerPlayer() then return false end
function c81011003.efilter(e,re,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end
local g=Duel.GetChainInfo(Duel.GetCurrentChain(),CHAININFO_TARGET_CARDS)
return not g or not g:IsContains(e:GetHandler())
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer() and not g:IsContains(e:GetHandler())
end
function c81011003.cbcon(e,tp,eg,ep,ev,re,r,rp)
return r~=REASON_REPLACE
......
......@@ -39,11 +39,10 @@ end
function cm.ffilter(c)
return c:IsFusionType(TYPE_EFFECT) and c:IsOnField()
end
function cm.efilter(e,re)
if re:GetOwnerPlayer()==e:GetOwnerPlayer() then return false end
function cm.efilter(e,re,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end
local g=Duel.GetChainInfo(Duel.GetCurrentChain(),CHAININFO_TARGET_CARDS)
return not g or not g:IsContains(e:GetHandler())
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer() and not g:IsContains(e:GetHandler())
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
if e==re or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
......
......@@ -5,7 +5,7 @@ function cm.initial_effect(c)
c:SetSPSummonOnce(m)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,cm.ffilter,2,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST)
aux.AddContactFusionProcedure(c,cm.matfilter,LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
......@@ -37,16 +37,16 @@ function cm.initial_effect(c)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--splimit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SPSUMMON_COST)
e3:SetCost(cm.spcost)
c:RegisterEffect(e3)
end
function cm.ffilter(c,fc,sub,mg,sg)
return c:IsFusionSetCard(0x81c) and c:IsFusionType(TYPE_RITUAL) and c:IsFusionType(TYPE_MONSTER) and (not sg or not sg:IsExists(Card.IsFusionCode,1,c,c:GetFusionCode()))
end
function cm.matfilter(c)
return c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(cm.sfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function cm.sfilter(c)
return c:IsFaceup() and c:IsSetCard(0x81c) and c:GetType()&0x81==0x81
end
function cm.tdcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
......@@ -91,9 +91,3 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
tc:CompleteProcedure()
end
end
function cm.spcost(e,c,tp,st)
return Duel.IsExistingMatchingCard(cm.sfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function cm.sfilter(c)
return c:IsFaceup() and c:IsSetCard(0x81c) and c:GetType()&0x81==0x81
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