Commit 388df741 authored by jwyxym's avatar jwyxym Committed by GitHub

Add files via upload

parent 74ecdb20
......@@ -81,8 +81,8 @@ function VgD.RideUpOperation(e,tp,eg,ep,ev,re,r,rp)
sc:SetMaterial(Group.FromCards(rc))
Duel.Overlay(sc,Group.FromCards(rc))
VgF.Call(sc,SUMMON_TYPE_RIDE,tp,0x20)
if Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_RIDE,0,1,nil,10400855) then
local tc=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_RIDE,0,nil,10400855):GetFirst()
if Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_RIDE,0,1,nil,TYPE_EMBLEM) then
local tc=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_RIDE,0,nil,TYPE_EMBLEM):GetFirst()
Duel.Sendto(tc,tp,LOCATION_EMBLEM,POS_FACEUP,REASON_EFFECT)
end
elseif sel==0 or (sel==1 and a and b) then
......@@ -121,18 +121,18 @@ function VgD.RideZeroOperation(e,tp,eg,ep,ev,re,r,rp)
VgF.Call(g,SUMMON_TYPE_RIDE,tp,0x20)
end
function VgD.RideZeroFilter(c,e,tp)
return c:IsLevel(1) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RIDE,tp,false,false,POS_FACEUP_ATTACK)
return VgF.IsLevel(c,0) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RIDE,tp,false,false,POS_FACEUP_ATTACK)
end
--Call到R位
function VgD.CallToR(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(1152)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_SPSUM_PARAM)
e1:SetTargetRange(POS_FACEUP_ATTACK,0)
e1:SetValue(SUMMON_TYPE_CALL)
e1:SetCondition(VgD.CallCondition)
e1:SetOperation(VgD.CallOperation)
c:RegisterEffect(e1)
......@@ -140,13 +140,14 @@ end
function VgD.CallCondition(e,c)
if c==nil then return true end
local tp=e:GetHandlerPlayer()
return VgF.LvCondition(e) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_CALL,tp,false,false,POS_FACEUP_ATTACK)
return VgF.LvCondition(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end
function VgD.CallFilter(c,tp,zone)
return VgF.RMonsterFilter(c) and zone==VgF.SequenceToGlobal(tp,c:GetLocation(),c:GetSequence())
end
function VgD.CallOperation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CallZONE)
local zone=Duel.SelectField(tp,1,LOCATION_MZONE,0,nil,0x0000e0)
if Duel.IsExistingMatchingCard(VgD.CallFilter,tp,LOCATION_MZONE,0,1,nil,tp,zone) then
local tc=Duel.GetMatchingGroup(tp,VgD.CallFilter,tp,LOCATION_MZONE,0,1,1,nil,tp,zone):GetFirst()
......@@ -210,6 +211,7 @@ function VgD.MonsterBattle(c)
e7:SetCode(EVENT_ATTACK_ANNOUNCE)
e7:SetRange(LOCATION_HAND+LOCATION_MZONE)
e7:SetCountLimit(1)
e7:SetCost(VgD.SendToGCost)
e7:SetCondition(VgD.SendToGCondition)
e7:SetOperation(VgD.SendToGOperation)
c:RegisterEffect(e7)
......@@ -285,7 +287,7 @@ end
function VgD.MonsterPosAttackOperation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.ChangePosition(c,POS_FACEUP_ATTACK)
Duel.Hint(HINT_LINES,tp,VgF.Stringid(VgID,0))
Duel.Hint(HINT_LINES,tp,VgF.Stringid(VgID,8))
end
function VgD.MonsterBattleDamageCondition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -310,7 +312,7 @@ function VgD.SupportCondition(e,tp,eg,ep,ev,re,r,rp)
return VgF.GetColumnGroup(Duel.GetAttacker()):IsContains(e:GetHandler()) and Duel.GetTurnPlayer()==tp and e:GetHandler():IsAttribute(SKILL_SUPPORT)
end
function VgD.SupportOperation(e,tp,eg,ep,ev,re,r,rp)
if not Duel.SelectYesNo(tp,VgF.Stringid(VgID,8)) then return end
if not Duel.SelectYesNo(tp,VgF.Stringid(VgID,7)) then return end
local c=e:GetHandler()
Duel.ChangePosition(c,POS_FACEUP_DEFENSE)
local e1=Effect.CreateEffect(c)
......@@ -324,9 +326,11 @@ function VgD.SendToGCost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsPublic() and (not Duel.IsPlayerAffectedByEffect(tp,AFFECT_CODE_SendtoG) or Duel.IsExistingMatchingCard(VgF.Not(Card.IsPublic),tp,LOCATION_HAND,0,1,c)) end
local g=Group.FromCards(c)
if Duel.IsPlayerAffectedByEffect(tp,AFFECT_CODE_SendtoG) then
local sg=Duel.SelectMatchingCard(tp,VgF.Not(Card.IsPublic),tp,LOCATION_HAND,0,1,1,c)
g:Merge(sg)
if Duel.IsPlayerAffectedByEffect(tp,AFFECT_CODE_SendtoG) and not Duel.IsExistingMatchingCard(Card.IsPublic,tp,LOCATION_HAND,0,2,nil) then
local tc=Duel.SelectMatchingCard(tp,VgF.Not(Card.IsPublic),tp,LOCATION_HAND,0,1,1,c)
tc=VgF.ReturnCard(tc)
e:SetLabelObject(tc)
g:AddCard(tc)
end
for tc in VgF.Next(g) do
local e1=Effect.CreateEffect(c)
......@@ -345,11 +349,18 @@ function VgD.SendToGOperation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=Duel.GetAttackTarget()
if not bc or not VgF.IsAbleToGZone(c) or not c:IsRelateToEffect(e) then return false end
Duel.Sendto(c,tp,LOCATION_GZONE,POS_FACEUP,REASON_EFFECT)
local def=c:GetDefense()
if def==0 then
Duel.RegisterFlagEffect(tp,DefenseEntirelyFlag,RESET_EVENT+EVENT_DAMAGE_STEP_END,0,1)
else
local tc=e:GetLabelObject()
local g=Group.FromCards(c)
if tc then
tc=vgf.ReturnCard(tc)
g:AddCard(tc)
if tc:GetDefense()>0 then
def=def+tc:GetDefense()>0
end
end
Duel.Sendto(g,tp,LOCATION_GZONE,POS_FACEUP,REASON_EFFECT)
if def>0 then
VgF.AtkUp(c,bc,def,nil)
end
end
......@@ -433,12 +444,12 @@ function VgD.CardTriggerOperation(chkop,f)
end
if chkop==0 then
if c:IsRace(TRRIGGER_SUPER) then
Duel.Exile(c,REASON_TRIGGER)
Duel.Draw(tp,1,REASON_TRIGGER)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKUP)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
Duel.HintSelection(g)
VgF.AtkUp(c,g,100000000,nil)
Duel.Exile(c,REASON_TRIGGER)
else
Duel.Sendto(c,tp,LOCATION_DAMAGE,POS_FACEUP,REASON_EFFECT)
Duel.Damage(tp,1,REASON_TRIGGER)
......@@ -706,10 +717,12 @@ function VgD.SpellOperation(op)
if op2 then op2(e,tp,eg,ep,ev,re,r,rp,true) end
end
end
function VgD.BeRidedByCard(c,m,code,property,con,cost,op,tg)
function VgD.BeRidedByCard(c,m,code,op,cost,con,tg,property)
local type2=EFFECT_TYPE_TRIGGER_F
if VgF.GetValueType(cost)=="function" then type2=EFFECT_TYPE_TRIGGER_O end
local e1=Effect.CreateEffect(c)
e1:SetDescription(VgF.Stringid(m,0))
e1:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_TRIGGER_F)
e1:SetType(EFFECT_TYPE_XMATERIAL+type2)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(VgD.BeRidedByCardCondition(code,con))
if property then e1:SetProperty(property) end
......@@ -721,6 +734,39 @@ end
function VgD.BeRidedByCardCondition(code,f)
return function (e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsCode(code) and (VgF.GetValueType(f)=="nil" or f(e,tp,eg,ep,ev,re,r,rp))
if code and code>0 and not c:IsCode(code) then return false end
return VgF.GetValueType(f)=="nil" or f(e,tp,eg,ep,ev,re,r,rp)
end
end
function VgD.EffectTypeTrigger(c,m,loc,type,code,op,cost,con,tg,count,property)
local type2=EFFECT_TYPE_TRIGGER_F
if VgF.GetValueType(cost)=="function" then type2=EFFECT_TYPE_TRIGGER_O end
if not type then type=EFFECT_TYPE_SINGLE end
if not loc then loc=LOCATION_MZONE end
local e1=Effect.CreateEffect(c)
e1:SetDescription(VgF.Stringid(m,0))
e1:SetType(type+type2)
e1:SetRange(loc)
e1:SetCode(code)
if property and property>0 then e1:SetProperty(property) end
if count and count>0 then e1:SetCountLimit(count) end
if VgF.GetValueType(con)=="function" then e1:SetCost(con) end
if VgF.GetValueType(cost)=="function" then e1:SetCost(cost) end
if VgF.GetValueType(tg)=="function" then e1:SetTarget(tg) end
if VgF.GetValueType(op)=="function" then e1:SetOperation(op) end
c:RegisterEffect(e1)
end
function VgD.EffectTypeIgnition(c,m,loc,op,cost,con,tg,count,property)
if not loc then loc=LOCATION_MZONE end
local e1=Effect.CreateEffect(c)
e1:SetDescription(VgF.Stringid(m,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(loc)
if property and property>0 then e1:SetProperty(property) end
if count and count>0 then e1:SetCountLimit(count) end
if VgF.GetValueType(con)=="function" then e1:SetCost(con) end
if VgF.GetValueType(cost)=="function" then e1:SetCost(cost) end
if VgF.GetValueType(tg)=="function" then e1:SetTarget(tg) end
if VgF.GetValueType(op)=="function" then e1:SetOperation(op) end
c:RegisterEffect(e1)
end
\ No newline at end of file
VgDefinition={}
VgID=10101001
vgid=VgID
--min/max value
MIN_ID =1000 --4 digits, by DataManager::GetDesc()
MAX_ID =268435455 --28 bits, by DataManager::GetDesc()
......@@ -76,6 +77,7 @@ TYPE_LINK =0x4000000 --连接
TYPES_TOKEN_MONSTER =0x4011
TYPES_NORMAL_TRAP_MONSTER =0x111
TYPES_EFFECT_TRAP_MONSTER =0x121
TYPE_EMBLEM =TYPE_TRAP+TYPE_COUNTER+TYPE_FUSION
--技能 --属性
SKILL_ALL =0x7f --All
SKILL_NONE =0x01 --无
......@@ -139,7 +141,7 @@ SUMMON_TYPE_FUSION =0x43000000 --融合召唤
SUMMON_TYPE_RITUAL =0x45000000 --仪式召唤
SUMMON_TYPE_SYNCHRO =0x46000000 --同调召唤
SUMMON_TYPE_RIDE =0x49000000 --骑升
SUMMON_TYPE_CALL =0x4a000000 --Call到R位
--SUMMON_TYPE_CALL =0x4a000000 --Call到R位
SUMMON_TYPE_LINK =0x4c000000 --连接召唤
--Summon Value --特定的召唤方式
SUMMON_VALUE_SELF =0x1 --自身效果或条件
......@@ -771,7 +773,7 @@ HINTMSG_SELF =529 --请选择自己的卡
HINTMSG_OPPO =530 --请选择对方的卡
HINTMSG_TRIBUTE =531 --请选择上级召唤用需要解放的怪兽
HINTMSG_DEATTACHFROM =532 --请选择要取除超量素材的怪兽
HINTMSG_LMATERIAL =533 --请选择要作为连接素材的卡
HINTMSG_OVERLAY =533 --请选择要重叠的卡
HINTMSG_ATTACKTARGET =549 --请选择攻击的对象
HINTMSG_EFFECT =550 --请选择要发动的效果
HINTMSG_TARGET =551 --请选择效果的对象
......@@ -789,7 +791,7 @@ HINGMSG_NUMBER =565 --请选择一个数字
HINGMSG_LVRANK =567 --请宣言一个等级
HINTMSG_RESOLVECARD =568 --请选择要处理效果的卡
HINTMSG_ZONE =569 --请选择[%ls]的位置
HINTMSG_DISABLEZONE =570 --请选择要变成不能使用的卡片区域
HINTMSG_CallZONE =570 --请选择圆阵
HINTMSG_TOZONE =571 --请选择要移动到的位置
HINTMSG_COUNTER =572 --请选择要放置指示物的卡
HINTMSG_DISABLE =573 --请选择要无效的卡
......@@ -878,7 +880,8 @@ FLAG_ID_NO_NORMAL_DRAW =3
CountTriggerFlag =VgID --计数标识
AttackTriggerFlag =VgID+1 --多次攻击判定标识
DamageTriggerFlag =VgID+2 --多次伤害判定标识
DefenseEntirelyFlag =VgID+3 --多次伤害判定标识
DefenseEntirelyFlag =VgID+3 --完全防御标识
ConditionFlag =VgID+4 --处于XX状态标识
--AffectedByEffect
AFFECT_CODE_MIX =VgID --魔合成
AFFECT_CODE_SendtoG =VgID+1 --
......
VgF={}
vgf=VgF
function VgF.VgCard(c)
VgD.Rule(c)
if c:IsType(TYPE_MONSTER) then
VgD.RideUp(c)
VgD.CallToR(c)
VgD.MonsterBattle(c)
end
if not c:IsRace(TRRIGGER_SUPER) then
VgD.CardTrigger(c,nil)
end
end
function GetID()
local offset=self_code<100000000 and 1 or 100
return self_table,self_code,offset
......@@ -87,6 +98,15 @@ end
function VgF.VMonsterCondition(e,c)
return VgF.VMonsterFilter(e:GetHandler())
end
function VgF.IsLevel(c,...)
for i,v in ipairs{...} do
local lv=v+1
if c:IsLevel(lv) then
return true
end
end
return false
end
function VgF.IsSequence(c,...)
for i,v in ipairs{...} do
if c:GetSequence()==v then
......@@ -150,6 +170,9 @@ function VgF.GetColumnGroup(c)
end
return g
end
function VgF.tgoval(e,re,rp)
return rp==1-e:GetHandlerPlayer()
end
function VgF.Call(g,sumtype,sp,zone)
if not zone then zone=0x7f end
return Duel.SpecialSummon(g,sumtype,sp,sp,true,true,POS_FACEUP_ATTACK,zone)
......@@ -194,7 +217,7 @@ function VgF.StarUp(c,g,val,reset)
end
function VgF.IsAbleToGZone(c)
if c:IsLocation(LOCATION_MZONE) then
return c:IsAttribute(SKILL_BLOCK) and VgF.IsSequence(c,0,4)
return c:IsAttribute(SKILL_BLOCK)
end
return c:IsLocation(LOCATION_HAND)
end
......@@ -211,9 +234,9 @@ end
function VgF.EnegyCost(num)
return function (e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_EMBLEM,0,num,nil,20401001)
return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_EMBLEM,0,num,nil,10800730)
end
local g=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_EMBLEM,0,1,1,nil,20401001)
local g=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_EMBLEM,0,1,1,nil,10800730)
Duel.SendtoGrave(g,REASON_COST)
end
end
......@@ -247,17 +270,12 @@ function VgF.DamageCost(num)
Duel.ChangePosition(g,POS_FACEDOWN)
end
end
function VgF.SearchCard(loc,code,setcard,country,trigger,skil)
function VgF.SearchCard(loc,f)
if not loc then return end
if not code and not setcard and not country and not trigger and not skil then return end
return function (e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,function (c)
if code and not c:IsCode(code) then return end
if setcard and not c:IsSetCard(setcard) then return end
if country and not c:GetCountry()&country>0 then return end
if trigger and not c:IsRace(trigger) then return end
if skil and not c:IsAttribute(skil) then return end
if VgF.GetValueType(f)=="function" and not f(c) then return false end
return c:IsAbleToHand()
end
,tp,loc,0,1,1,nil)
......@@ -267,23 +285,18 @@ function VgF.SearchCard(loc,code,setcard,country,trigger,skil)
end
end
end
function VgF.SearchCardSpecialSummon(loc,code,setcard,country,trigger,skil)
function VgF.SearchCardSpecialSummon(loc,f)
if not loc then return end
if not code and not setcard and not country and not trigger and not skil then return end
return function (e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,function (c)
if code and not c:IsCode(code) then return end
if setcard and not c:IsSetCard(setcard) then return end
if country and not c:GetCountry()&country>0 then return end
if trigger and not c:IsRace(trigger) then return end
if skil and not c:IsAttribute(skil) then return end
return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_CALL,tp,false,false,POS_FACEUP_ATTACK)
if VgF.GetValueType(f)=="function" and not f(c) then return false end
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end
,tp,loc,0,1,1,nil)
if g:GetCount()>0 then
if loc&LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA==0 then Duel.HintSelection(g) end
VgF.Call(g,SUMMON_TYPE_CALL,tp)
VgF.Call(g,0,tp)
end
end
end
\ No newline at end of file
--
local cm,m,o=GetID()
function cm.initial_effect(c)
VgD.Rule(c)
VgD.RideUp(c)
VgD.CallToR(c)
VgD.MonsterBattle(c)
VgD.CardTrigger(c,nil)
vgf.VgCard(c)
vgd.EffectTypeIgnition(c,m,LOCATION_MZONE,vgf.SearchCardSpecialSummon(LOCATION_DROP,cm.filter),vgf.DisCardCost(1),nil,nil,1)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_ATTACK_ANNOUNCE,cm.operation,vgf.DamageCost(1))
end
function cm.filter(c)
return vgf.IsLevel(c,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Group.FromCards(c)
local sg=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_MZONE,0,nil,0x3210)
if sg then g:Merge(sg) end
for tc in VgF.Next(g) do
VgF.AtkUp(c,tc,10000,nil)
end
end
\ No newline at end of file
--
local cm,m,o=GetID()
function cm.initial_effect(c)
vgd.Rule(c)
vgd.RideUp(c)
vgd.CallToR(c)
vgd.MonsterBattle(c)
vgd.CardTrigger(c,nil)
vgf.VgCard(c)
vgd.BeRidedByCard(c,m,10101001,vgf.SearchCard(LOCATION_DECK,cm.filter),vgf.OverlayCost(1))
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.con)
e1:SetValue(2000)
c:RegisterEffect(e1)
end
function cm.filter(c)
return c:IsCode(10101006)
end
function cm.con(e)
return Duel.GetAttacker()==e:GetHandler()
end
\ No newline at end of file
--
local cm,m,o=GetID()
function cm.initial_effect(c)
vgd.Rule(c)
vgd.RideUp(c)
vgd.CallToR(c)
vgd.MonsterBattle(c)
vgd.CardTrigger(c,nil)
vgf.VgCard(c)
vgd.BeRidedByCard(c,m,10101002,vgf.SearchCardSpecialSummon(LOCATION_DECK,cm.filter))
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.con)
e1:SetValue(2000)
c:RegisterEffect(e1)
end
function cm.filter(c)
return c:IsCode(10101009)
end
function cm.con(e)
return Duel.GetAttacker()==e:GetHandler()
end
\ No newline at end of file
--
local cm,m,o=GetID()
function cm.initial_effect(c)
vgd.Rule(c)
vgd.RideUp(c)
vgd.CallToR(c)
vgd.MonsterBattle(c)
vgd.CardTrigger(c,nil)
vgf.VgCard(c)
vgd.BeRidedByCard(c,m,nil,cm.operation,nil,cm.condition)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandlerPlayer()==1
end
\ No newline at end of file
--
local cm,m,o=GetID()
function cm.initial_effect(c)
vgd.Rule(c)
vgd.RideUp(c)
vgd.CallToR(c)
vgd.MonsterBattle(c)
vgd.CardTrigger(c,nil)
vgf.VgCard(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.con)
e1:SetValue(2000)
c:RegisterEffect(e1)
end
function cm.con(e)
return Duel.GetAttacker()==e:GetHandler()
end
\ No newline at end of file
--
local cm,m,o=GetID()
function cm.initial_effect(c)
vgd.Rule(c)
vgd.RideUp(c)
vgd.CallToR(c)
vgd.MonsterBattle(c)
vgd.CardTrigger(c,nil)
vgf.VgCard(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(vgf.Stringid(vgid,9))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_SPSUM_PARAM)
e1:SetTargetRange(POS_FACEUP_ATTACK,0)
e1:SetCondition(cm.condition)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_ATTACK_ANNOUNCE,cm.operation2)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_CUSTOM+m,cm.operation3,vgf.OverlayCost(2))
end
function cm.condition(e,c)
if c==nil then return true end
local tp=e:GetHandlerPlayer()
return vgf.LvCondition(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.filter(c)
return vgf.RMonsterFilter(c) and c:IsCode(10101009)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OVERLAY)
local tc=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil)
tc=vgf.ReturnCard(tc)
local zone=vgf.SequenceToGlobal(tp,tc:GetLocation(),tc:GetSequence())
e:SetValue(function () return 0,zone end)
c:SetMaterial(Group.FromCards(tc))
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(c,mg)
end
c:SetMaterial(Group.FromCards(tc))
Duel.Overlay(c,Group.FromCards(tc))
c:RegisterFlagEffect(ConditionFlag,RESET_EVENT+RESETS_STANDARD,0,1,201)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
VgF.AtkUp(c,c,10000,nil)
Duel.RaiseEvent(c,EVENT_CUSTOM+m,e,0,tp,tp,0)
end
function cm.operation3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LEAVEONFIELD)
local g=Duel.SelectTarget(tp,vgf.RMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
if g then
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
--
local cm,m,o=GetID()
function cm.initial_effect(c)
vgd.Rule(c)
vgd.RideUp(c)
vgd.CallToR(c)
vgd.MonsterBattle(c)
vgd.CardTrigger(c,nil)
vgf.VgCard(c)
end
\ No newline at end of file
--
local cm,m,o=GetID()
function cm.initial_effect(c)
vgd.Rule(c)
vgd.RideUp(c)
vgd.CallToR(c)
vgd.MonsterBattle(c)
vgd.CardTrigger(c,nil)
vgf.VgCard(c)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_MOVE,cm.operation,vgf.DisCardCost(1),cm.condition)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_GZONE) and Duel.GetAttackTarget()
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,DefenseEntirelyFlag,RESET_EVENT+EVENT_DAMAGE_STEP_END,0,1)
end
\ No newline at end of file
--
local cm,m,o=GetID()
function cm.initial_effect(c)
vgd.Rule(c)
vgd.RideUp(c)
vgd.CallToR(c)
vgd.MonsterBattle(c)
vgd.CardTrigger(c,nil)
vgf.VgCard(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetCondition(vgf.RMonsterCondition)
e1:SetValue(vgf.tgoval)
c:RegisterEffect(e1)
end
\ No newline at end of file
--
local cm,m,o=GetID()
function cm.initial_effect(c)
vgd.Rule(c)
vgd.RideUp(c)
vgd.CallToR(c)
vgd.MonsterBattle(c)
vgd.CardTrigger(c,nil)
vgf.VgCard(c)
VgD.CardTrigger(c,cm.operation)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKUP)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
if g then
Duel.HintSelection(g)
vgf.AtkUp(c,g,100000000,nil)
end
end
\ No newline at end of file
--
local cm,m,o=GetID()
function cm.initial_effect(c)
vgd.Rule(c)
vgd.RideUp(c)
vgd.CallToR(c)
vgd.MonsterBattle(c)
vgd.CardTrigger(c,nil)
vgf.VgCard(c)
end
\ No newline at end of file
--
local cm,m,o=GetID()
function cm.initial_effect(c)
vgd.Rule(c)
vgd.RideUp(c)
vgd.CallToR(c)
vgd.MonsterBattle(c)
vgd.CardTrigger(c,nil)
vgf.VgCard(c)
end
\ No newline at end of file
--
local cm,m,o=GetID()
function cm.initial_effect(c)
vgd.Rule(c)
vgd.RideUp(c)
vgd.CallToR(c)
vgd.MonsterBattle(c)
vgd.CardTrigger(c,nil)
vgf.VgCard(c)
end
\ No newline at end of file
--
local cm,m,o=GetID()
function cm.initial_effect(c)
vgd.Rule(c)
vgd.RideUp(c)
vgd.CallToR(c)
vgd.MonsterBattle(c)
vgd.CardTrigger(c,nil)
vgf.VgCard(c)
end
\ No newline at end of file
--
local cm,m,o=GetID()
function cm.initial_effect(c)
vgd.Rule(c)
vgd.RideUp(c)
vgd.CardTrigger(c,nil)
vgd.SpellActivate(c,m,cm.op)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DROP,0,1,1,nil)
if g then Duel.SendtoHand(g,nil,REASON_EFFECT) end
vgf.VgCard(c)
vgd.SpellActivate(c,m,vgf.SearchCard(LOCATION_DROP,cm.filter))
end
function cm.filter(c)
return c:IsCode(10101006) and c:IsAbleToHand()
return c:IsCode(10101006)
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