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