Commit a11ed57b authored by Nemo Ma's avatar Nemo Ma

Sync: Add Vosion

parent e1774514
No preview for this file type
......@@ -31,40 +31,61 @@ function scard.initial_effect(c)
e3:SetTargetRange(1, 0)
e3:SetValue(scard.efilter)
c:RegisterEffect(e3)
--Special Summon token
--cannot set
local e4 = Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_TOKEN)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_SSET)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetRange(LOCATION_FZONE)
e4:SetProperty(EFFECT_FLAG_BOTH_SIDE)
e4:SetTarget(scard.tktg)
e4:SetOperation(scard.tkop)
e4:SetTargetRange(1, 0)
e4:SetTarget(scard.setfilter)
c:RegisterEffect(e4)
--cannot special summon
--Special Summon token
local e5 = Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_TOKEN)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_FZONE)
e5:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetTargetRange(1, 0)
e5:SetTarget(scard.splimit)
e5:SetProperty(EFFECT_FLAG_BOTH_SIDE)
e5:SetTarget(scard.tktg)
e5:SetOperation(scard.tkop)
c:RegisterEffect(e5)
--cannot link material
--cannot special summon
local e6 = Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e6:SetTargetRange(LOCATION_MZONE, LOCATION_MZONE)
e6:SetTarget(aux.TargetBoolFunction(Card.IsCode, id + 1))
e6:SetValue(1)
e6:SetRange(LOCATION_FZONE)
e6:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetTargetRange(1, 0)
e6:SetTarget(scard.splimit)
c:RegisterEffect(e6)
--release all
--cannot link material
local e7 = Effect.CreateEffect(c)
e7:SetCategory(CATEGORY_RECOVER)
e7:SetType(EFFECT_TYPE_TRIGGER_F + EFFECT_TYPE_SINGLE)
e7:SetCode(EVENT_LEAVE_FIELD)
e7:SetTarget(scard.reltg)
e7:SetOperation(scard.relop)
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e7:SetTargetRange(LOCATION_MZONE, LOCATION_MZONE)
e7:SetTarget(aux.TargetBoolFunction(Card.IsCode, id + 1))
e7:SetValue(1)
c:RegisterEffect(e7)
--release all
local e8 = Effect.CreateEffect(c)
e8:SetCategory(CATEGORY_RECOVER)
e8:SetType(EFFECT_TYPE_TRIGGER_F + EFFECT_TYPE_SINGLE)
e8:SetCode(EVENT_LEAVE_FIELD)
e8:SetTarget(scard.reltg)
e8:SetOperation(scard.relop)
c:RegisterEffect(e8)
--oops tcg didn't ban cannon soldier
local e9 = Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_FIELD)
e9:SetCode(EFFECT_CHANGE_DAMAGE)
e9:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e9:SetRange(LOCATION_FZONE)
e9:SetTargetRange(1, 1)
e9:SetValue(scard.damval)
c:RegisterEffect(e9)
local ea = e9:Clone()
ea:SetCode(EFFECT_NO_EFFECT_DAMAGE)
c:RegisterEffect(ea)
if not scard.global_check then
scard.global_check = true
scard[0] = 0
......@@ -76,6 +97,9 @@ end
function scard.efilter(e, re, tp)
return re:GetHandler():IsType(TYPE_FIELD) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function scard.setfilter(e, c)
return c:IsType(TYPE_FIELD)
end
function scard.regtg(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then
return true
......@@ -247,8 +271,9 @@ function scard.relfilter(c)
end
function scard.reltg(e, tp, eg, ep, ev, re, r, rp, chk)
scard.release_check = true
local c = e:GetHandler()
if chk == 0 then
return not e:GetHandler():IsLocation(LOCATION_DECK) and not (c:IsLocation(LOCATION_REMOVED) and c:IsFacedown())
return not c:IsLocation(LOCATION_DECK) and not (c:IsLocation(LOCATION_REMOVED) and c:IsFacedown())
end
local g = Duel.GetMatchingGroup(scard.relfilter, tp, LOCATION_MZONE, LOCATION_MZONE, nil)
Duel.SetOperationInfo(0, CATEGORY_RELEASE, g, #g, 0, 0)
......@@ -267,3 +292,9 @@ function scard.relop(e, tp, eg, ep, ev, re, r, rp)
end
scard.release_check = false
end
function scard.damval(e, re, val, r, rp, rc)
if r & REASON_EFFECT ~= 0 then
return 0
end
return val
end
--虚毒SPINE
local m=33700701
local cm=_G["c"..m]
if not RSVeVal then
RSVeVal=RSVeVal or {}
rsve=RSVeVal
function rsve.addcounter(tp,ct,chk,rc)
local g=Duel.GetMatchingGroup(rsve.ctfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,rc)
if chk then return g:GetCount()>0 end
if g:GetCount()<=0 then return end
local ct2=ct
local eg=Group.CreateGroup()
repeat
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tg=g:Select(tp,1,1,nil)
Duel.HintSelection(tg)
eg:Merge(tg)
local tc=tg:GetFirst()
local tbl={}
for i=1,ct2 do
tbl[i]=i
end
local ct3=Duel.AnnounceNumber(tp,table.unpack(tbl))
tc:AddCounter(0x144b,ct3)
ct2=ct2-ct3
until ct2==0
Duel.RaiseEvent(eg,EVENT_CUSTOM+33700711,e,REASON_EFFECT,tp,tp,ct)
end
function rsve.ctfilter(c)
return c:IsFaceup() and c:IsCanAddCounter(0x144b,1)
end
function rsve.BattleFunction(c,atk)
--no battle damage
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_NO_BATTLE_DAMAGE)
c:RegisterEffect(e4)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e3:SetValue(1)
c:RegisterEffect(e3)
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(m,1))
e7:SetCategory(CATEGORY_REMOVE+CATEGORY_ATKCHANGE)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e7:SetCode(EVENT_DAMAGE_STEP_END)
e7:SetCondition(rsve.rmcon)
e7:SetOperation(rsve.rmop)
e7:SetLabel(atk)
c:RegisterEffect(e7)
end
function rsve.rmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsOnField() and bc:IsRelateToBattle() and (bc:IsAttackAbove(0) or bc:IsDefenseAbove(0))
end
function rsve.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if bc and bc:IsOnField() and bc:IsRelateToBattle() and (bc:IsAttackAbove(0) or bc:IsDefenseAbove(0)) then
local val=e:GetLabel()
local patk,pdef=bc:GetAttack(),bc:GetDefense()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-val)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
bc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
bc:RegisterEffect(e2)
if (bc:IsAttack(0) and patk>0) or (bc:IsDefense(0) and pdef>0) then Duel.Remove(bc,POS_FACEUP,REASON_EFFECT) end
end
end
function rsve.DirectAttackFunction(c,ct)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_DAMAGE_STEP_END)
e1:SetCondition(rsve.ctcon)
e1:SetOperation(rsve.ctop)
c:RegisterEffect(e1)
end
function rsve.ctcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget()==nil
end
function rsve.ctop(e,tp,eg,ep,ev,re,r,rp)
rsve.addcounter(tp,4)
end
function rsve.NormalSummonFunction(c,ct)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetLabel(ct)
e1:SetCondition(rsve.otcon)
e1:SetOperation(rsve.otop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e2)
end
function rsve.otcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
return c:IsLevelAbove(5) and minc<=1 and Duel.IsCanRemoveCounter(tp,1,1,0x144b,e:GetLabel(),REASON_RULE)
end
function rsve.otop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.RemoveCounter(tp,1,1,0x144b,e:GetLabel(),REASON_RULE)
end
function rsve.ToGraveFunction(c,ct,con,cost)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
if con then e1:SetCondition(con) end
if cost then e1:SetCost(cost) end
e1:SetOperation(rsve.ctop2)
e1:SetLabel(ct)
c:RegisterEffect(e1)
end
function rsve.ctop2(e,tp,eg,ep,ev,re,r,rp)
rsve.addcounter(tp,e:GetLabel())
end
function rsve.AttackUpFunction(c,ct)
--
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(rsve.atkval)
e2:SetLabel(ct)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
end
function rsve.atkval(e,c)
return Duel.GetCounter(0,1,1,0x144b)*e:GetLabel()
end
function rsve.FusionMaterialFunction(c,ct)
c:EnableReviveLimit()
aux.AddFusionProcFunRep2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x144b),ct,ct,false)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(rsve.splimit)
c:RegisterEffect(e1)
end
function rsve.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0x144b)
end
-------------------------------------------
end
if cm then
function cm.initial_effect(c)
rsve.BattleFunction(c,800)
rsve.DirectAttackFunction(c,4)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetOperation(cm.ctop)
c:RegisterEffect(e2)
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
rsve.addcounter(tp,4)
end
function cm.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsCanRemoveCounter(c:GetControler(),1,1,0x144b,4,REASON_COST)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.RemoveCounter(tp,1,1,0x144b,4,REASON_RULE)
end
end
\ No newline at end of file
--虚毒STAKE
if not pcall(function() require("expansions/script/c33700701") end) then require("script/c33700701") end
local m=33700702
local cm=_G["c"..m]
function cm.initial_effect(c)
rsve.BattleFunction(c,1200)
rsve.DirectAttackFunction(c,3)
--co
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(cm.tg)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x144b))
e1:SetValue(cm.atkval)
c:RegisterEffect(e1)
end
function cm.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x144b)
end
function cm.atkval(e,c)
return Duel.GetMatchingGroupCount(cm.atkfilter,c:GetControler(),LOCATION_ONFIELD,0,nil)*200
end
function cm.cfilter(c)
return not c:IsForbidden() and c:IsSetCard(0x144b)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_EXTRA,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.cfilter),tp,LOCATION_EXTRA,0,1,1,nil):GetFirst()
if tc and Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fc0000)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
--虚毒BOAT
if not pcall(function() require("expansions/script/c33700701") end) then require("script/c33700701") end
local m=33700703
local cm=_G["c"..m]
function cm.initial_effect(c)
rsve.BattleFunction(c,1600)
rsve.DirectAttackFunction(c,4)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(cm.eqtg)
e1:SetOperation(cm.eqop)
c:RegisterEffect(e1)
end
function cm.filter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x144b)
and Duel.IsExistingMatchingCard(cm.eqfilter,tp,LOCATION_EXTRA,0,1,nil,c,tp)
end
function cm.eqfilter(c,tc,tp)
return c:CheckUniqueOnField(tp) and not c:IsForbidden() and c:IsSetCard(0x144b)
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.filter(chkc,tp) end
local ft=0
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil,tp)
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local ec=Duel.SelectMatchingCard(tp,cm.eqfilter,tp,LOCATION_EXTRA,0,1,1,nil,tc,tp):GetFirst()
if ec and Duel.Equip(tp,ec,tc)~=0 then
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(cm.eqlimit)
ec:RegisterEffect(e1)
local e5=Effect.CreateEffect(tc)
e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_EQUIP)
e5:SetCode(EFFECT_DESTROY_REPLACE)
e5:SetTarget(cm.reptg)
e5:SetOperation(cm.repop)
ec:RegisterEffect(e5)
end
end
end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) and c:GetEquipTarget():IsReason(REASON_BATTLE+REASON_EFFECT) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE)
end
function cm.eqlimit(e,c)
return e:GetOwner()==c
end
--虚毒CELL
if not pcall(function() require("expansions/script/c33700701") end) then require("script/c33700701") end
local m=33700704
local cm=_G["c"..m]
function cm.initial_effect(c)
--control
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_CONTROL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(cm.ctltg)
e2:SetOperation(cm.ctlop)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e4)
--damage reduce
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e1:SetCondition(cm.rdcon)
e1:SetOperation(cm.rdop)
c:RegisterEffect(e1)
--effect gain
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_BE_MATERIAL)
e5:SetCondition(cm.efcon)
e5:SetOperation(cm.efop)
c:RegisterEffect(e5)
end
function cm.efcon(e,tp,eg,ep,ev,re,r,rp)
local rc=e:GetHandler():GetReasonCard()
return rc:GetSummonLocation()==LOCATION_EXTRA
end
function cm.efop(e,tp,eg,ep,ev,re,r,rp)
local rc=e:GetHandler():GetReasonCard()
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetDescription(aux.Stringid(m,1))
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetOperation(cm.ctop)
rc:RegisterEffect(e3,true)
local e1=e3:Clone()
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
rsve.addcounter(tp,4)
end
function cm.rdcon(e,tp,eg,ep,ev,re,r,rp)
local ct=math.floor(ev/100)
return ep==tp and e:GetHandler():IsCanAddCounter(0x144b,ct)
end
function cm.rdop(e,tp,eg,ep,ev,re,r,rp)
local ct=math.floor(ev/100)
e:GetHandler():AddCounter(0x144b,ct)
Duel.ChangeBattleDamage(ep,ev-ct*100)
end
function cm.cfilter(c)
return c:IsSetCard(0x144b) and c:IsAbleToGrave()
end
function cm.ctltg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsControlerCanBeChanged() and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA)
end
function cm.ctlop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()<=0 or Duel.SendtoGrave(g,REASON_EFFECT)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.GetControl(c,1-tp)
end
end
\ No newline at end of file
--虚毒IDOL
if not pcall(function() require("expansions/script/c33700701") end) then require("script/c33700701") end
local m=33700705
local cm=_G["c"..m]
function cm.initial_effect(c)
rsve.NormalSummonFunction(c,2)
rsve.BattleFunction(c,2200)
rsve.DirectAttackFunction(c,5)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetOperation(cm.ctop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
rsve.addcounter(tp,5)
end
--虚毒SHROUD
if not pcall(function() require("expansions/script/c33700701") end) then require("script/c33700701") end
local m=33700706
local cm=_G["c"..m]
function cm.initial_effect(c)
rsve.NormalSummonFunction(c,4)
rsve.BattleFunction(c,2500)
rsve.DirectAttackFunction(c,5)
--tg
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_COUNTER)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(cm.tgtg)
e1:SetOperation(cm.tgop)
c:RegisterEffect(e1)
end
function cm.tgfilter(c)
local ct=c:GetCounter(0x144b)
return ct>0 and c:IsCanRemoveCounter(tp,0x144b,ct,REASON_EFFECT) and c:IsAbleToGrave() and Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and cm.tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,cm.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local ct=tc:GetCounter(0x144b)
if ct>0 and tc:IsCanRemoveCounter(tp,0x144b,ct,REASON_EFFECT) and tc:RemoveCounter(tp,0x144b,ct,REASON_EFFECT) and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 then
rsve.addcounter(tp,ct)
end
end
\ No newline at end of file
--虚毒构造 BASIC
if not pcall(function() require("expansions/script/c33700701") end) then require("script/c33700701") end
local m=33700707
local cm=_G["c"..m]
function cm.initial_effect(c)
rsve.FusionMaterialFunction(c,3)
rsve.ToGraveFunction(c,2)
rsve.AttackUpFunction(c,300)
end
--虚毒构造 MATERIAL
if not pcall(function() require("expansions/script/c33700701") end) then require("script/c33700701") end
local m=33700708
local cm=_G["c"..m]
function cm.initial_effect(c)
rsve.FusionMaterialFunction(c,4)
rsve.ToGraveFunction(c,7,cm.con)
rsve.AttackUpFunction(c,500)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT) and re:GetHandler():IsSetCard(0x144b)
end
\ No newline at end of file
--虚毒构造 WHOLE
if not pcall(function() require("expansions/script/c33700701") end) then require("script/c33700701") end
local m=33700709
local cm=_G["c"..m]
function cm.initial_effect(c)
rsve.FusionMaterialFunction(c,5)
rsve.ToGraveFunction(c,11,cm.con,cm.cost)
rsve.AttackUpFunction(c,500)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x144b,2,REASON_COST) end
Duel.RemoveCounter(tp,1,1,0x144b,2,REASON_COST)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT) and re and re:GetHandler():IsSetCard(0x144b)
end
\ No newline at end of file
--虚毒概念 一元论
if not pcall(function() require("expansions/script/c33700701") end) then require("script/c33700701") end
local m=33700710
local cm=_G["c"..m]
function cm.initial_effect(c)
rsve.FusionMaterialFunction(c,3)
rsve.ToGraveFunction(c,2)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetCondition(cm.con)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x144b))
e1:SetValue(500)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetCondition(cm.con2)
e4:SetValue(1000)
c:RegisterEffect(e4)
local e3=e4:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
end
function cm.con(e)
return e:GetHandler():IsType(TYPE_CONTINUOUS)
end
function cm.con2(e)
return e:GetHandler():GetEquipTarget():IsSetCard(0x144b)
end
\ No newline at end of file
--虚毒概念 辩证法
if not pcall(function() require("expansions/script/c33700701") end) then require("script/c33700701") end
local m=33700711
local cm=_G["c"..m]
function cm.initial_effect(c)
rsve.FusionMaterialFunction(c,4)
rsve.ToGraveFunction(c,2)
--add counter
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_CUSTOM+m)
e2:SetCondition(cm.ctcon)
e2:SetOperation(cm.ctop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(cm.ctcon2)
e3:SetOperation(cm.ctop2)
c:RegisterEffect(e3)
end
function cm.ctcon(e)
return e:GetHandler():IsType(TYPE_CONTINUOUS)
end
function cm.ctop(e)
e:GetHandler():AddCounter(COUNTER_NEED_ENABLE+0x144b,1)
end
function cm.ctcon2(e)
local bc=e:GetHandler():GetEquipTarget()
return bc and bc:IsSetCard(0x144b) and Duel.GetAttacker()==bc
end
function cm.ctop2(e)
local bc=e:GetHandler():GetEquipTarget()
if not e:GetHandler():IsRelateToEffect(e) or not bc:IsRelateToBattle() then return end
bc:AddCounter(0x144b,1)
--Duel.RaiseEvent(bc,EVENT_CUSTOM+33700711,e,REASON_EFFECT,tp,tp,1)
end
--虚毒概念 唯物主义
if not pcall(function() require("expansions/script/c33700701") end) then require("script/c33700701") end
local m=33700712
local cm=_G["c"..m]
function cm.initial_effect(c)
rsve.FusionMaterialFunction(c,5)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOEXTRA+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetTarget(cm.drtg)
e1:SetOperation(cm.drop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCondition(cm.drcon2)
e2:SetCountLimit(1)
e2:SetCost(cm.drcost2)
e2:SetTarget(cm.drtg2)
e2:SetOperation(cm.drop2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(cm.drcon3)
e3:SetTarget(cm.drtg2)
e3:SetOperation(cm.drop2)
c:RegisterEffect(e3)
end
function cm.drcon3(e)
local bc=e:GetHandler():GetEquipTarget()
return bc and bc:IsSetCard(0x144b) and Duel.GetAttacker()==bc
end
function cm.drcon2(e)
return e:GetHandler():IsType(TYPE_CONTINUOUS)
end
function cm.drcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x144b,2,REASON_COST) end
Duel.RemoveCounter(tp,1,1,0x144b,2,REASON_COST)
end
function cm.drtg2(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,1)
end
function cm.drop2(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function cm.drfilter(c,e)
return c:IsSetCard(0x144b) and c:IsType(TYPE_FUSION) and c:IsAbleToExtra() and c:IsCanBeEffectTarget(e)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local g=Duel.GetMatchingGroup(cm.drfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and g:GetClassCount(Card.GetCode)>1 end
local sg=Group.CreateGroup()
for i=1,2 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=g:Select(tp,1,1,nil)
g:Remove(Card.IsCode,nil,g1:GetFirst():GetCode())
sg:Merge(g1)
end
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if not tg or tg:GetCount()<=0 or Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)<=0 then return end
Duel.Draw(tp,1,REASON_EFFECT)
end
\ No newline at end of file
--虚毒之光
local m=33700713
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--dam
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCondition(cm.damcon1)
e2:SetOperation(cm.damop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCondition(cm.damcon2)
e3:SetOperation(cm.damop2)
c:RegisterEffect(e3)
end
function cm.damcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.GetCounter(tp,1,1,0x144b)>0
end
function cm.damcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetCounter(tp,0,1,0x144b)>0
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetCounter(tp,1,1,0x144b)
if ct>0 then
Duel.Hint(HINT_CARD,0,m)
Duel.Damage(1-tp,ct*50,REASON_EFFECT)
end
end
function cm.damop2(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetCounter(tp,0,1,0x144b)
if ct>0 and Duel.GetTurnPlayer()~=tp then
Duel.Hint(HINT_CARD,0,m)
Duel.Damage(1-tp,ct*100,REASON_EFFECT)
end
end
function cm.filter(c)
return not c:IsCode(m) and c:IsSetCard(0x144b) 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.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
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
\ No newline at end of file
--虚毒降临
if not pcall(function() require("expansions/script/c33700701") end) then require("script/c33700701") end
local m=33700714
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE+CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.thfilter(c)
return c:IsSetCard(0x144b) and c:IsAbleToHand()
end
function cm.filter(c)
return c:IsLevelAbove(1) and c:IsSetCard(0x144b) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() and rsve.addcounter(tp,c:GetLevel()*2,0)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil)
local b2=Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,nil)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(m,0))
else
op=Duel.SelectOption(tp,aux.Stringid(m,1))+1
end
e:SetLabel(op)
if op==0 then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
else
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA+LOCATION_HAND)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
rsve.addcounter(tp,g:GetFirst():GetLevel()*2,nil,e:GetHandler())
end
end
end
--虚毒往生
if not pcall(function() require("expansions/script/c33700701") end) then require("script/c33700701") end
local m=33700715
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.tdfilter(c)
return c:IsSetCard(0x144b) and c:IsAbleToDeck()
end
function cm.spfilter(c,e,tp)
return c:IsLevelAbove(1) and c:IsSetCard(0x144b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsCanRemoveCounter(tp,1,1,0x144b,c:GetLevel(),REASON_EFFECT)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingTarget(cm.tdfilter,tp,LOCATION_GRAVE,0,3,nil) and Duel.IsPlayerCanDraw(tp,1)
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(m,0))
else
op=Duel.SelectOption(tp,aux.Stringid(m,1))+1
end
e:SetLabel(op)
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_GRAVE,0,3,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,3,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_GRAVE)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()<=0 then return end
if e:GetLabel()==0 then
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 then
local og=Duel.GetOperatedGroup()
if og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then
Duel.ShuffleDeck(tp)
end
Duel.Draw(tp,1,REASON_EFFECT)
end
else
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.RemoveCounter(tp,1,1,0x144b,g:GetFirst():GetLevel(),REASON_EFFECT) then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--虚毒溶解
local m=33700716
local cm=_G["c"..m]
function cm.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCost(cm.atcost)
e1:SetOperation(cm.atop)
c:RegisterEffect(e1)
end
function cm.atfilter(c)
return c:IsSetCard(0x144b) and Duel.IsExistingMatchingCard(cm.atfilter2,0,LOCATION_MZONE,LOCATION_MZONE,1,c)
end
function cm.atfilter2(c)
return not c:IsSetCard(0x144b) and c:IsFaceup() and (c:IsAttackAbove(0) or c:IsDefenseAbove(0))
end
function cm.disfilter(c)
return not c:IsSetCard(0x144b) and c:IsFaceup() and aux.disfilter1(c) and c:GetCounter(0x144b)>0
end
function cm.atop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.atfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local atk=e:GetLabel()
local rg=Group.CreateGroup()
for tc in aux.Next(g) do
local atk,def=tc:GetAttack(),tc:GetDefense()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
if (atk>0 and tc:IsAttack(0)) or (def>0 and tc:IsDefense(0)) then
rg:AddCard(tc)
end
end
if rg:GetCount()>0 then
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
local sg=Duel.GetMatchingGroup(cm.disfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
for tc in aux.Next(sg) do
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_DISABLE_EFFECT)
e4:SetValue(RESET_TURN_SET)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e4)
end
end
function cm.atcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.atfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,cm.atfilter,1,1,nil)
local atk=g:GetFirst():GetTextAttack()
if atk<0 then atk=0 end
e:SetLabel(atk)
Duel.Release(g,REASON_COST)
end
--堕入虚毒duel.ge
if not pcall(function() require("expansions/script/c33700701") end) then require("script/c33700701") end
local m=33700717
local cm=_G["c"..m]
function cm.initial_effect(c)
--damage
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_TOGRAVE+CATEGORY_DESTROY+CATEGORY_COUNTER+CATEGORY_TOGRAVE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.damtg)
c:RegisterEffect(e1)
end
function cm.tgfilter(c)
return c:IsFaceup() and c:IsSetCard(0x144b) and c:GetCounter(0x144b)>0
end
function cm.desfilter(c)
return c:IsFaceup() and c:IsLevelAbove(1) and c:IsAttackAbove(1) and rsve.addcounter(tp,c:GetLevel(),0,c)
end
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,m)+1
local b1=Duel.GetCounter(tp,1,1,0x144b)>0
local b2=Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_ONFIELD,0,1,nil)
local b3=Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_MZONE,0,1,nil)
if chk==0 then return b1 or b2 or b3 end
local sel={}
for i=1,ct do
local ops={}
local opval={}
local off=1
if #sel==ct then break end
if #sel>=1 and (b1 or b2 or b3) and not Duel.SelectYesNo(tp,aux.Stringid(m,3)) then break end
if b1 then
ops[off]=aux.Stringid(m,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(m,1)
opval[off-1]=2
off=off+1
end
if b3 then
ops[off]=aux.Stringid(m,2)
opval[off-1]=3
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
sel[#sel+1]=opval[op]
if opval[op]==1 then b1=false end
if opval[op]==2 then b2=false end
if opval[op]==3 then b3=false end
end
e:SetOperation(cm.damop(sel))
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0)
end
function cm.damop(sel)
return function(e,tp,eg,ep,ev,re,r,rp)
for _,ct in ipairs(sel) do
if ct==1 then
local ct=Duel.GetCounter(tp,1,1,0x144b)
Duel.Damage(1-tp,ct*50,REASON_EFFECT)
elseif ct==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_ONFIELD,0,1,1,nil):GetFirst()
if tc then
local ct=tc:GetCounter(0x144b)
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 then
Duel.Damage(1-tp,ct*100,REASON_EFFECT)
end
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if tc and Duel.Destroy(tc,REASON_EFFECT)~=0 and Duel.Damage(1-tp,tc:GetAttack(),REASON_EFFECT)~=0 then
rsve.addcounter(tp,tc:GetLevel(),nil)
end
end
end
end
end
--逃离虚毒
if not pcall(function() require("expansions/script/c33700701") end) then require("script/c33700701") end
local m=33700718
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--counter
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_COUNTER)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1)
e3:SetTarget(cm.target)
e3:SetOperation(cm.operation)
c:RegisterEffect(e3)
--damage
local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(m,0))
e8:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE+CATEGORY_DAMAGE+CATEGORY_REMOVE)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e8:SetCode(EVENT_PHASE+PHASE_STANDBY)
e8:SetRange(LOCATION_SZONE)
e8:SetCountLimit(1)
e8:SetCondition(cm.damcon)
e8:SetOperation(cm.damop)
c:RegisterEffect(e8)
end
function cm.cfilter(c,e)
return c:IsFaceup() and not c:IsSetCard(0x144b)
end
function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetCounter(0x144b)
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if Duel.GetFieldGroup(tp,0,LOCATION_MZONE)<=0 then
Duel.Damage(1-tp,ct*100,REASON_EFFECT)
else
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(-ct*100)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
end
end
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,e:GetHandler())
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(cm.filter,nil,e)
if g:GetCount()<=0 then return end
if g:GetCount()==2 then
for tc in aux.Next(g) do
tc:RemoveCounter(tp,0x144b,1,REASON_EFFECT)
c:AddCounter(0x144b,1)
end
else
local tc=g:GetFirst()
local ct=tc:GetCounter(0x144b)
local ct2=1
if ct>1 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
ct2=2
end
tc:RemoveCounter(tp,0x144b,ct2,REASON_EFFECT)
c:AddCounter(0x144b,ct2)
end
end
function cm.filter(c,e)
return c:IsFaceup() and c:IsCanRemoveCounter(tp,0x144b,1,REASON_EFFECT) and (not e or c:IsRelateToEffect(e))
end
--虚毒过载
local m=33700719
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--damage
local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(m,0))
e8:SetCategory(CATEGORY_DAMAGE)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e8:SetCode(EVENT_PHASE+PHASE_STANDBY)
e8:SetRange(LOCATION_SZONE)
e8:SetCountLimit(1)
e8:SetCondition(cm.damcon)
e8:SetTarget(cm.damtg)
e8:SetOperation(cm.damop)
c:RegisterEffect(e8)
local e2=e8:Clone()
e2:SetCode(EVENT_PHASE+PHASE_END)
c:RegisterEffect(e2)
--rec
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetCondition(cm.reccon)
e3:SetTarget(cm.rectg)
e3:SetOperation(cm.recop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_PHASE+PHASE_END)
c:RegisterEffect(e4)
--place
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,2))
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetRange(LOCATION_GRAVE)
e5:SetHintTiming(0,TIMING_END_PHASE)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetCost(cm.setcost)
e5:SetTarget(cm.settg)
e5:SetOperation(cm.setop)
c:RegisterEffect(e5)
end
function cm.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x144b,4,REASON_COST) end
Duel.RemoveCounter(tp,1,1,0x144b,4,REASON_COST)
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and not c:IsForbidden() and c:CheckUniqueOnField(tp) end
Duel.SetTargetCard(c)
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsForbidden() or not c:CheckUniqueOnField(tp) or not c:IsRelateToEffect(e) then return end
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
function cm.reccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function cm.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=Duel.GetCounter(tp,1,0,0x144b)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct*50)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*50)
end
function cm.recop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local ct=Duel.GetCounter(tp,1,0,0x144b)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,ct*50,REASON_EFFECT)
end
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=Duel.GetCounter(tp,0,1,0x144b)
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(ct*50)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*50)
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local ct=Duel.GetCounter(tp,0,1,0x144b)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,ct*50,REASON_EFFECT)
end
function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
\ No newline at end of file
--VOICEROID 茜
local m=33700784
local cm=_G["c"..m]
if not RSVoVal then
RSVoVal=RSVoVal or {}
rsvo=RSVoVal
--other link material bug repair
function Auxiliary.LCheckOtherMaterial(c,mg,lc)
local le={c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL)}
if #le==0 then return true end
for _,te in pairs(le) do
local f=te:GetValue()
if not f or f(te,lc,mg) then return true end
end
return false
end
function Auxiliary.LExtraFilter(c,f,lc)
if c:IsLocation(LOCATION_ONFIELD) and not c:IsFaceup() then return false end
return c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL) and (c:IsCanBeLinkMaterial(lc) or ((bit.band(c:GetOriginalType(),TYPE_SPELL)~=0 or bit.band(c:GetOriginalType(),TYPE_TRAP)~=0) and not c:IsType(TYPE_MONSTER))) and (not f or f(c))
end
function rsvo.LPLinkFunction(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_CYBERSE+RACE_MACHINE),2,2)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(rsvo.linkcon)
e1:SetOperation(rsvo.linkop)
e1:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e1)
end
function rsvo.lmfilter(c,lc)
local tp=lc:GetControler()
return c:IsFaceup() and c:IsCanBeLinkMaterial(lc) and c:IsLinkRace(RACE_CYBERSE+RACE_MACHINE) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_LMATERIAL) and (not c:IsType(TYPE_LINK) or c:GetLink()==1) and Duel.GetLocationCountFromEx(tp,tp,c)>0
end
function rsvo.linkcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(rsvo.lmfilter,tp,LOCATION_MZONE,0,1,nil,c) and Duel.CheckLPCost(tp,1500)
end
function rsvo.linkop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.PayLPCost(tp,1500)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local mg=Duel.SelectMatchingCard(tp,rsvo.lmfilter,tp,LOCATION_MZONE,0,1,1,nil,c)
c:SetMaterial(mg)
Duel.SendtoGrave(mg,REASON_LINK)
end
function rsvo.OneReplaceLinkFunction(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,3))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(rsvo.linkcon2)
e1:SetOperation(rsvo.linkop2)
e1:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e1)
end
function rsvo.lmfilter2(c,lc,tp)
return c:IsFaceup() and c:IsCanBeLinkMaterial(lc) and c:IsSetCard(0x144c) and not c:IsCode(lc:GetCode()) and Duel.IsExistingMatchingCard(rsvo.lmfilter3,tp,LOCATION_MZONE,0,1,c,lc,c)
end
function rsvo.lmfilter3(c,lc,rc)
local tp=lc:GetControler()
local g=Group.FromCards(c,rc)
return c:IsFaceup() and c:IsCanBeLinkMaterial(lc) and c:IsLinkRace(RACE_CYBERSE+RACE_MACHINE) and aux.MustMaterialCheck(g,tp,EFFECT_MUST_BE_LMATERIAL) and Duel.GetLocationCountFromEx(tp,tp,g)>0
end
function rsvo.linkcon2(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(rsvo.lmfilter2,tp,LOCATION_MZONE,0,1,nil,c,tp)
end
function rsvo.linkop2(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local mg1=Duel.SelectMatchingCard(tp,rsvo.lmfilter2,tp,LOCATION_MZONE,0,1,1,nil,c,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local mg2=Duel.SelectMatchingCard(tp,rsvo.lmfilter3,tp,LOCATION_MZONE,0,1,1,mg1:GetFirst(),c,mg1:GetFirst())
mg1:Merge(mg2)
c:SetMaterial(mg1)
Duel.SendtoGrave(mg1,REASON_LINK)
end
function rsvo.YukaLinkFunction(c)
Duel.EnableGlobalFlag(GLOBALFLAG_SELF_TOGRAVE)
c:EnableReviveLimit()
rsvo.OneReplaceLinkFunction(c)
aux.AddLinkProcedure(c,rsvo.lmatfilter,1,3,rsvo.lcheck)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EFFECT_SELF_TOGRAVE)
e1:SetCondition(rsvo.sdcon)
c:RegisterEffect(e1)
end
function rsvo.lmatfilter(c)
return c:IsLinkRace(RACE_CYBERSE+RACE_MACHINE) or c:IsCode(33700789)
end
function rsvo.lcheck(g,lc)
return g:GetCount()==3 or (g:GetCount()==1 and g:IsExists(Card.IsCode,1,nil,33700789))
end
function rsvo.sdfilter(c)
return c:IsFaceup() and c:IsCode(33700789)
end
function rsvo.sdcon(e)
return Duel.IsExistingMatchingCard(rsvo.sdfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end
end
-------------------
if cm then
function cm.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,cm.lfilter,2,2)
--extra link
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetTarget(cm.mattg)
e0:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e0:SetTargetRange(LOCATION_SZONE,0)
e0:SetValue(cm.matval)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.thcon)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_LINK)
end
function cm.thfilter(c,tp,setable)
return c:IsType(TYPE_TRAP) and (c:IsAbleToHand() or (setable and c:IsSSetable())) and (c:IsControler(tp) or setable)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=e:GetHandler():GetMutualLinkedGroup()
local setable=g:IsExists(Card.IsCode,1,nil,m+1) and true or false
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.thfilter(chkc,tp,setable) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,tp,setable) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,tp,setable)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local g=e:GetHandler():GetMutualLinkedGroup()
local setable=g:IsExists(Card.IsCode,1,nil,m+1) and true or false
local b1=tc:IsAbleToHand()
local b2=e:GetHandler():IsRelateToEffect(e) and setable and tc:IsAbleToHand()
if not b1 and not b2 then return end
if b1 and (not b2 or not Duel.SelectYesNo(tp,aux.Stringid(m,1))) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
else
Duel.SSet(tp,tc)
end
end
function cm.lfilter(c)
return c:IsLinkRace(RACE_CYBERSE+RACE_MACHINE) or c:IsType(TYPE_TRAP)
end
function cm.matval(e,c,mg)
return c:IsCode(m)
end
function cm.mattg(e,c)
return c:IsFaceup() and c:IsType(TYPE_TRAP)
end
---------------------
end
--VOICEROID 葵
if not pcall(function() require("expansions/script/c33700784") end) then require("script/c33700784") end
local m=33700785
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,cm.lfilter,2,2)
c:EnableReviveLimit()
--extra link
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetTarget(cm.mattg)
e0:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e0:SetTargetRange(LOCATION_SZONE,0)
e0:SetValue(cm.matval)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.thcon)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_LINK)
end
function cm.thfilter(c,tp,setable)
return c:IsType(TYPE_SPELL) and (c:IsAbleToHand() or (setable and c:IsSSetable())) and (c:IsControler(tp) or setable)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=e:GetHandler():GetMutualLinkedGroup()
local setable=g:IsExists(Card.IsCode,1,nil,m-1) and true or false
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.thfilter(chkc,tp,setable) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,tp,setable) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,tp,setable)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local g=e:GetHandler():GetMutualLinkedGroup()
local setable=g:IsExists(Card.IsCode,1,nil,m-1) and true or false
local b1=tc:IsAbleToHand()
local b2=e:GetHandler():IsRelateToEffect(e) and setable and tc:IsAbleToHand()
if not b1 and not b2 then return end
if b1 and (not b2 or not Duel.SelectYesNo(tp,aux.Stringid(m,1))) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
else
Duel.SSet(tp,tc)
end
end
function cm.lfilter(c)
return c:IsLinkRace(RACE_CYBERSE+RACE_MACHINE) or c:IsType(TYPE_SPELL)
end
function cm.matval(e,c,mg)
return c:IsCode(m)
end
function cm.mattg(e,c)
return c:IsFaceup() and c:IsType(TYPE_SPELL)
end
\ No newline at end of file
--VOICEROID 俊子
if not pcall(function() require("expansions/script/c33700784") end) then require("script/c33700784") end
local m=33700786
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
rsvo.LPLinkFunction(c)
--rec
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_RECOVER+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetTarget(cm.rectg)
e1:SetCondition(cm.reccon)
e1:SetOperation(cm.recop)
c:RegisterEffect(e1)
--damage
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(cm.reccon1)
e5:SetOperation(cm.recop1)
c:RegisterEffect(e5)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(cm.regcon)
e3:SetOperation(cm.regop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_CHAIN_SOLVED)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(cm.reccon2)
e4:SetOperation(cm.recop2)
c:RegisterEffect(e4)
end
function cm.reccon1(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetHandler():GetMutualLinkedGroup()
return eg:IsExists(Card.IsControler,1,nil,1-tp)
and (not re or not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS)) and g:IsExists(Card.IsCode,1,nil,m+1)
end
function cm.recop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
local ct=eg:FilterCount(Card.IsControler,nil,1-tp)
Duel.Recover(tp,ct*300,REASON_EFFECT)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetHandler():GetMutualLinkedGroup()
return re and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS) and g:IsExists(Card.IsCode,1,nil,m+1)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1,eg:GetCount())
end
function cm.reccon2(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetHandler():GetMutualLinkedGroup()
return e:GetHandler():GetFlagEffect(m)>0 and g:IsExists(Card.IsCode,1,nil,m+1)
end
function cm.recop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
local labels={e:GetHandler():GetFlagEffectLabel(m)}
local ct=0
for i=1,#labels do ct=ct+labels[i] end
e:GetHandler():ResetFlagEffect(m)
Duel.Recover(tp,ct*300,REASON_EFFECT)
end
function cm.filter(c)
return c:GetAttack()>0 and c:IsAbleToRemove()
end
function cm.rectg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetFirst():GetAttack())
end
function cm.recop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) then
Duel.Recover(tp,tc:GetAttack(),REASON_EFFECT)
end
end
function cm.reccon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_LINK)
end
--VOICEROID 俊子
if not pcall(function() require("expansions/script/c33700784") end) then require("script/c33700784") end
local m=33700787
local cm=_G["c"..m]
function cm.initial_effect(c)
rsvo.LPLinkFunction(c)
--rec
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_RECOVER+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetTarget(cm.rectg)
e1:SetCondition(cm.reccon)
e1:SetOperation(cm.recop)
c:RegisterEffect(e1)
--damage
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_RECOVER)
e3:SetCondition(cm.damcon)
e3:SetOperation(cm.damop)
c:RegisterEffect(e3)
end
function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetHandler():GetMutualLinkedGroup()
return g:IsExists(Card.IsCode,1,nil,m-1)
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.Damage(1-tp,ev/2,REASON_EFFECT)
end
function cm.filter(c)
return c:GetDefense()>0 and c:IsAbleToRemove()
end
function cm.rectg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetFirst():GetDefense())
end
function cm.recop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) then
Duel.Recover(tp,tc:GetDefense(),REASON_EFFECT)
end
end
function cm.reccon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_LINK)
end
--VOICEROID 灯
if not pcall(function() require("expansions/script/c33700784") end) then require("script/c33700784") end
local m=33700788
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
rsvo.OneReplaceLinkFunction(c)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_CYBERSE+RACE_MACHINE),3,3)
c:EnableReviveLimit()
--indestructable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(cm.indtg)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
c:RegisterEffect(e2)
--effect gain
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(cm.atkval)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e5:SetTarget(cm.eftg)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
end
function cm.eftg(e,c)
local lg=e:GetHandler():GetMutualLinkedGroup()
return c:IsType(TYPE_EFFECT) and c:IsSetCard(0x144c) and lg:IsContains(c) and not c:IsCode(e:GetHandler():GetCode())
end
function cm.atkval(e,c)
return c:GetLinkedGroupCount()*1000
end
function cm.indtg(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c)
end
\ No newline at end of file
--VOICEROID 缘
if not pcall(function() require("expansions/script/c33700784") end) then require("script/c33700784") end
local m=33700789
local cm=_G["c"..m]
function cm.initial_effect(c)
rsvo.YukaLinkFunction(c)
--tg
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m)
e3:SetTarget(cm.tgtg)
e3:SetOperation(cm.tgop)
c:RegisterEffect(e3)
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local ct=c:GetMutualLinkedGroup():FilterCount(Card.IsSetCard,nil,0x144c)
if chk==0 then return ct>0 and Duel.IsPlayerCanDiscardDeck(tp,ct) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,ct,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_GRAVE)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local ct=c:GetMutualLinkedGroup():FilterCount(Card.IsSetCard,nil,0x144c)
if ct<=0 or not Duel.IsPlayerCanDiscardDeck(tp,1) then return end
Duel.DiscardDeck(tp,ct,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:GetCount()<=0 then return end
local fid=c:GetFieldID()
local rct=1
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then rct=2 end
for tc in aux.Next(g) do
if tc:IsControler(tp) then
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,rct,fid)
else
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_OPPO_TURN,0,rct,fid)
end
end
g:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(g)
e1:SetCondition(cm.spcon)
e1:SetOperation(cm.spop)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
e1:SetValue(Duel.GetTurnCount())
else
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
e1:SetValue(0)
end
Duel.RegisterEffect(e1,tp)
end
function cm.spcfilter(c,fid,e,tp)
return c:GetFlagEffectLabel(m)==fid and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()~=tp or Duel.GetTurnCount()==e:GetValue() then return false end
local g=e:GetLabelObject()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local sg=g:Filter(cm.spcfilter,nil,e:GetLabel(),e,tp)
if sg:GetCount()<=0 or ft<=0 or (ft>=2 and sg:GetCount()>=2 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local sg=g:Filter(cm.spcfilter,nil,e:GetLabel(),e,tp)
g:DeleteGroup()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
ft=math.min(sg:GetCount(),ft)
Duel.Hint(HINT_CARD,0,m)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg2=sg:Select(tp,ft,ft,nil)
Duel.SpecialSummon(sg2,0,tp,tp,false,false,POS_FACEUP)
end
--导入幻想
function c33700792.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_DECKDES+CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,33700792+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c33700792.cost)
e1:SetTarget(c33700792.target)
e1:SetOperation(c33700792.activate)
c:RegisterEffect(e1)
end
function c33700792.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetLabelObject(e)
e2:SetTarget(c33700792.splimit)
Duel.RegisterEffect(e2,tp)
end
function c33700792.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return se~=e:GetLabelObject() and c:IsLocation(LOCATION_EXTRA)
end
function c33700792.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
function c33700792.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c33700792.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c33700792.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local mg2=Duel.GetMatchingGroup(c33700792.filter0,tp,LOCATION_DECK,0,nil)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(c33700792.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c33700792.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c33700792.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c33700792.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c33700792.filter0,tp,LOCATION_DECK,0,nil)
mg1:Merge(mg2)
local sg1=Duel.GetMatchingGroup(c33700792.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c33700792.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
Duel.BreakEffect()
Duel.GetControl(tc,1-tp)
end
end
--丸吞
function c33700793.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E)
e1:SetCost(c33700793.cost)
c:RegisterEffect(e1)
--sp
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33700793,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_BOTH_SIDE+EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c33700793.spcon)
e2:SetCost(c33700793.spcost)
e2:SetTarget(c33700793.sptg)
e2:SetOperation(c33700793.spop)
c:RegisterEffect(e2)
e2:SetLabelObject(e1)
--dam
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_DAMAGE)
e5:SetDescription(aux.Stringid(33700793,0))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetCode(EVENT_DESTROYED)
e5:SetCondition(c33700793.damcon)
e5:SetTarget(c33700793.damtg)
e5:SetOperation(c33700793.damop)
c:RegisterEffect(e5)
e5:SetLabelObject(e1)
end
function c33700793.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP)
end
function c33700793.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=e:GetLabelObject():GetCount()
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct*2000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,ct*2000)
end
function c33700793.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function c33700793.spcon(e,tp,eg,ep,ev,re,r,rp)
return tp~=e:GetHandlerPlayer() and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c33700793.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c33700793.spfilter(c,e,tp,fid)
return c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:GetFlagEffectLabel(33700793)==fid
end
function c33700793.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=e:GetLabelObject():GetLabelObject()
local fid=e:GetLabelObject():GetLabel()
if chk==0 then
if e:GetLabel()~=1 then e:SetLabel(0) return false end
return (Duel.CheckLPCost(tp,1000) or Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0) and g:IsExists(c33700793.spfilter,1,nil,e,tp,fid) and c:GetFlagEffect(33700893)==0
end
c:RegisterFlagEffect(33700893,RESET_CHAIN,0,1)
local ac=0
local costlp=0
local costgp=Group.CreateGroup()
local i=0
local sg=g:Filter(c33700793.spfilter,nil,e,tp,fid)
local sgct=sg:GetCount()
repeat
i=i+1
if ac==1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then break end
local lpct=math.floor(Duel.GetLP(tp)/1000)
lpct=math.min(sgct-ac,lpct-ac)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then
lpct=math.min(lpct,1)
end
local b1=lpct>0
local cardct=Duel.GetMatchingGroupCount(nil,tp,LOCATION_HAND,0,costgp)
cardct=math.min(sgct-ac,cardct)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then
cardct=math.min(cardct,1)
end
local b2=cardct>0
if not b1 and not b2 then break end
local t={}
for i=1,lpct do
t[i]=i*1000
end
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(33700793,2)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(33700793,3)
opval[off-1]=2
off=off+1
end
if i>1 then
ops[off]=aux.Stringid(33700793,1)
opval[off-1]=3
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
if sel==1 then
local lpct2=Duel.AnnounceNumber(tp,table.unpack(t))
ac=ac+lpct2/1000
costlp=costlp+lpct2
elseif sel==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local costgp2=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND,0,1,cardct,costgp)
local costgpct=costgp2:GetCount()
ac=ac+costgpct
costgp:Merge(costgp2)
else
break
end
until ac==sgct
if costlp>0 then
Duel.PayLPCost(tp,costlp)
end
if costgp then
Duel.SendtoHand(costgp,1-tp,REASON_EFFECT)
Duel.ShuffleHand(tp)
Duel.ShuffleHand(1-tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg2=sg:Select(tp,ac,ac,nil)
Duel.SetTargetCard(sg2)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg2,sg2:GetCount(),0,0)
end
function c33700793.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if sg:GetCount()>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=sg:Select(tp,ft,ft,nil)
end
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)~=0 and c:IsRelateToEffect(e) then
Duel.Destroy(c,REASON_EFFECT)
end
end
function c33700793.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local rg=Duel.GetReleaseGroup(1-tp)
if chk==0 then return rg:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=rg:Select(tp,1,99,nil)
Duel.Release(g,REASON_COST)
local fid=c:GetFieldID()
e:SetLabel(fid)
for tc in aux.Next(g) do
tc:RegisterFlagEffect(33700793,RESET_EVENT+RESETS_STANDARD,0,1,fid)
end
g:KeepAlive()
e:SetLabelObject(g)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_SZONE)
e1:SetLabel(g:GetCount())
e1:SetCondition(c33700793.tgcon)
e1:SetOperation(c33700793.tgop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,3)
c:RegisterEffect(e1,true)
c:RegisterFlagEffect(33700793,RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,3)
c33700793[e:GetHandler()]=e1
end
function c33700793.tgcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function c33700793.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
ct=ct+1
c:SetTurnCounter(ct)
if ct==3 then
Duel.SendtoGrave(c,REASON_RULE)
c:ResetFlagEffect(33700793)
Duel.Recover(tp,e:GetLabel()*1000,REASON_EFFECT)
end
end
--偶像部虚拟主播 夜樱 灵
function c33700794.initial_effect(c)
c:EnableReviveLimit()
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(c33700794.sprcon)
e1:SetOperation(c33700794.sprop)
c:RegisterEffect(e1)
--disable attack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33700794,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetTarget(c33700794.atktg)
e2:SetOperation(c33700794.atkop)
c:RegisterEffect(e2)
end
function c33700794.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
local atk=e:GetHandler():GetAttack()
if chk==0 then return Duel.GetAttacker()==e:GetHandler() and Duel.IsExistingMatchingCard(c33700794.tgfilter,tp,0,LOCATION_MZONE,1,nil,atk) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_MZONE)
end
function c33700794.tgfilter(c,atk)
return c:IsFaceup() and c:IsAttackBelow(atk-1)
end
function c33700794.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local atk=c:GetAttack()
if c:IsRelateToBattle() and Duel.NegateAttack() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c33700794.tgfilter,tp,0,LOCATION_MZONE,1,4,nil,atk)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
function c33700794.thfilter(c,tp)
return c33700794.thfilter2(c) and Duel.GetMZoneCount(tp,c,tp)>0
end
function c33700794.thfilter2(c)
return c:IsFaceup() and not c:IsSummonableCard() and c:IsAbleToHandAsCost()
end
function c33700794.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c33700794.thfilter,tp,LOCATION_MZONE,0,1,nil,tp)
end
function c33700794.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c33700794.thfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
if Duel.IsExistingMatchingCard(c33700794.thfilter2,tp,LOCATION_MZONE,0,1,g:GetFirst()) and Duel.SelectYesNo(tp,aux.Stringid(33700794,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g2=Duel.SelectMatchingCard(tp,c33700794.thfilter2,tp,LOCATION_MZONE,0,1,99,g:GetFirst())
g:Merge(g2)
end
Duel.SendtoHand(g,nil,REASON_COST)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
e1:SetValue(g:GetCount()*1000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
c:RegisterEffect(e2)
end
\ No newline at end of file
--VOICEROID 缘 ~稳~
if not pcall(function() require("expansions/script/c33700784") end) then require("script/c33700784") end
local m=33700800
local cm=_G["c"..m]
function cm.initial_effect(c)
rsvo.YukaLinkFunction(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_LINK) and c:GetMaterial():IsExists(Card.IsSetCard,1,nil,0x144c) and c:GetMutualLinkedGroup():IsExists(Card.IsSetCard,1,nil,0x144c)
end
function cm.filter(c,e,tp,zone)
return c:IsSetCard(0x144c) and c:IsAttack(1200) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local zone=bit.band(e:GetHandler():GetLinkedZone(tp),0x1f)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter(chkc,e,tp,zone) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp,zone) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,zone)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local zone=bit.band(e:GetHandler():GetLinkedZone(tp),0x1f)
if tc:IsRelateToEffect(e) and zone~=0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone)
end
end
--VOICEROID 缘 ~凛~
if not pcall(function() require("expansions/script/c33700784") end) then require("script/c33700784") end
local m=33700801
local cm=_G["c"..m]
function cm.initial_effect(c)
rsvo.YukaLinkFunction(c)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.atkval)
c:RegisterEffect(e1)
--pierce
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e2)
--actlimit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,1)
e3:SetValue(cm.aclimit)
e3:SetCondition(cm.actcon)
c:RegisterEffect(e3)
end
function cm.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function cm.actcon(e)
return Duel.GetAttacker()==e:GetHandler()
end
function cm.atkval(e,c)
return c:GetLinkedGroup():FilterCount(cm.cfilter,nil)*800
end
function cm.cfilter(c)
return c:IsSetCard(0x144c) and c:IsFaceup()
end
\ No newline at end of file
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