Commit e5c11ca4 authored by jwyxym's avatar jwyxym Committed by GitHub

Add files via upload

parent 007acf59
......@@ -148,14 +148,15 @@ 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,0,tp,false,false,POS_FACEUP_ATTACK) and Duel.GetMatchingGroupCount(Card.IsPosition,tp,LOCATION_MZONE,0,nil,POS_FACEDOWN_ATTACK)<5
if VgF.GetAvailableLocation(tp)<=0 then return end
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()
local z=0xe0
local z=VgF.GetAvailableLocation(tp)
local rg=Duel.GetMatchingGroup(Card.IsPosition,sp,LOCATION_MZONE,0,nil,POS_FACEDOWN_ATTACK)
for tc in VgF.Next(rg) do
local szone=VgF.SequenceToGlobal(sp,tc:GetLocation(),tc:GetSequence())
......
......@@ -291,8 +291,9 @@ end
function VgF.tgoval(e,re,rp)
return rp==1-e:GetHandlerPlayer()
end
function VgF.GetAvailableLocation(tp)
local z=0xe0
function VgF.GetAvailableLocation(tp,zone)
local z
if zone then z=zone else z==0xe0 end
local rg=Duel.GetMatchingGroup(Card.IsPosition,tp,LOCATION_MZONE,0,nil,POS_FACEDOWN_ATTACK)
for tc in VgF.Next(rg) do
local szone=VgF.SequenceToGlobal(tp,tc:GetLocation(),tc:GetSequence())
......@@ -308,12 +309,21 @@ end
---@return integer Call成功的数量
function VgF.Call(g,sumtype,tp,zone,pos)
if VgF.GetValueType(pos)~="number" then pos=POS_FACEUP_ATTACK end
if zone then
if Duel.IsExistingMatchingCard(VgD.CallFilter,tp,LOCATION_MZONE,0,1,nil,tp,zone) then
local tc=Duel.GetMatchingGroup(VgD.CallFilter,tp,LOCATION_MZONE,0,nil,tp,zone):GetFirst()
if zone and zone>0 then
local z=VgF.GetAvailableLocation(tp,zone)
local ct=bit.ReturnCount(z)
local szone
if ct>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CallZONE)
szone=Duel.SelectField(tp,1,LOCATION_MZONE,0,z)
else
szone=z
end
if Duel.IsExistingMatchingCard(VgD.CallFilter,tp,LOCATION_MZONE,0,1,nil,tp,szone) then
local tc=Duel.GetMatchingGroup(VgD.CallFilter,tp,LOCATION_MZONE,0,nil,tp,szone):GetFirst()
Duel.SendtoGrave(tc,REASON_COST)
end
return Duel.SpecialSummon(g,sumtype,tp,tp,false,false,pos,zone)
return Duel.SpecialSummon(g,sumtype,tp,tp,false,false,pos,szone)
end
local sg
local z=VgF.GetAvailableLocation(tp)
......
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.op,cm.cost,cm.con)
vgd.EffectTypeTrigger(c,m,nil,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.op,cm.cost,cm.con)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
......@@ -26,7 +26,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return vgf.IsSequence(c,5) and r==REASON_RIDEUP
return c:IsSummonType(SUMMON_TYPE_RIDE) or c:IsSummonType(SUMMON_TYPE_SELFRIDE)
end
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffectLabel(tp,ConditionFlag)==10102001
......
......@@ -19,6 +19,7 @@ function cm.con(e,tp,eg,ep,ev,re,r,rp)
return vgf.IsSequence(c,5) and r==REASON_RIDEUP
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
if vgf.GetAvailableLocation(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CALL)
local g=Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst():GetOverlayGroup():FilterSelect(tp,Card.IsCanBeSpecialSummoned,1,1,nil,e,0,tp,false,false,POS_FACEUP_ATTACK,0x4)
if vgf.Call(g,0,tp,0x4)>0 then
......
......@@ -16,9 +16,9 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,1)
local tc=vgf.ReturnCard(g)
Duel.DisableShuffleCheck()
if tc:IsType(TYPE_MONSTER) then
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) then
vgf.Call(g,0,tp)
else
elseif tc:IsAbleToGrave() then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
......@@ -31,5 +31,5 @@ function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.filter(c)
return vgf.IsLevel(c,3) and vgf.RmonsterFilter(c)
return vgf.IsLevel(c,3) and vgf.VmonsterFilter(c)
end
\ No newline at end of file
......@@ -13,7 +13,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,1)
local tc=vgf.ReturnCard(g)
Duel.DisableShuffleCheck()
if tc:IsType(TYPE_MONSTER) then
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) then
vgf.Call(g,0,tp)
elseif tc:IsAbleToHand() then
Duel.SendtoHand(g,nil,REASON_EFFECT)
......
......@@ -20,7 +20,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,1)
local tc=vgf.ReturnCard(g)
Duel.DisableShuffleCheck()
if tc:IsType(TYPE_MONSTER) and vgf.IsLevel(tc,0,1,2) then
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) and vgf.IsLevel(tc,0,1,2) then
vgf.Call(g,0,tp)
elseif tc:IsCanOverlay() then
Duel.Overlay(c,g)
......
......@@ -11,9 +11,9 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,1)
local tc=vgf.ReturnCard(g)
Duel.DisableShuffleCheck()
if tc:IsType(TYPE_MONSTER) then
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) then
vgf.Call(g,0,tp)
else
elseif tc:IsAbleToHand() then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
......
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_ATTACK_ANNOUNCE,cm.operation,vgf.OverlayCost(1),cm.condition)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_BATTLED,cm.operation1,nil,cm.condition1)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return vgf.VMonsterFilter(c)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_MZONE,0,1,2,nil)
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
function cm.filter(c)
return vgf.RMonsterFilter(c) and c:IsAbleToHand()
end
function cm.condition1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_SELFRIDE)
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local zone=vgf.GetAvailableLocation(tp)
local ct=bit.ReturnCount(zone)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CALL)
local g=Duel.SelectMatchingCard(tp,Card.IsCanBeSpecialSummoned,tp,LOCATION_HAND,0,0,ct,nil,e,0,tp,false,false,POS_FACEUP_ATTACK)
if g:GetCount()==1 then
vgf.Call(g,0,tp)
elseif g:GetCount()==2 then
local tc1=g:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CallZONE)
local szone=Duel.SelectField(tp,1,LOCATION_MZONE,0,zone)
if Duel.IsExistingMatchingCard(VgD.CallFilter,tp,LOCATION_MZONE,0,1,nil,tp,szone) then
local tc=Duel.GetMatchingGroup(VgD.CallFilter,tp,LOCATION_MZONE,0,nil,tp,szone):GetFirst()
Duel.SendtoGrave(tc,REASON_COST)
end
Duel.SpecialSummonStep(tc1,0,tp,tp,false,false,POS_FACEUP_ATTACK,szone)
if szone&0x11>0 then
zone=0xe
else
zone=0x11
end
local tc2=g:GetNext()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CallZONE)
szone=Duel.SelectField(tp,1,LOCATION_MZONE,0,zone)
if Duel.IsExistingMatchingCard(VgD.CallFilter,tp,LOCATION_MZONE,0,1,nil,tp,szone) then
local tc=Duel.GetMatchingGroup(VgD.CallFilter,tp,LOCATION_MZONE,0,nil,tp,szone):GetFirst()
Duel.SendtoGrave(tc,REASON_COST)
end
Duel.SpecialSummonStep(tc2,0,tp,tp,false,false,POS_FACEUP_ATTACK,szone)
Duel.SpecialSummonComplete()
end
end
\ No newline at end of file
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_ATTACK_ANNOUNCE,cm.operation,vgf.True,vgf.VMonsterCondition)
vgd.EffectTypeContinuousChangeAttack(c,EFFECT_TYPE_SINGLE,5000,cm.con)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
function cm.filter(c)
return vgf.RMonsterFilter(c) and c:IsAbleToHand()
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil,e:GetHandler()) and Duel.GetAttacker()==e:GetHandler() and vgf.RMonsterCondition(e)
end
function cm.cfilter(c,mc)
return vgf.GetColumnGroup(c):IsContains(mc) and c:IsControler(mc:GetControler()) and c:GetFlagEffect(SupportFlag)>0
end
\ No newline at end of file
--
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.EffectTypeTrigger(c,m,nil,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.operation,vgf.True,cm.con)
vgd.EffectTypeTrigger(c,m,nil,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.operation1,nil,cm.con2)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_RIDE) or c:IsSummonType(SUMMON_TYPE_SELFRIDE)
end
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return not cm.con(e,tp,eg,ep,ev,re,r,rp)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if vgf.GetAvailableLocation(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_Call)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.HintSelection(g)
vgf.Call(g,0,tp,nil,POS_FACEUP_DEFENSE)
end
function cm.filter(c)
return c:IsLevel(c,0,1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
vgf.AtkUp(c,c,2000)
end
\ No newline at end of file
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.operation,vgf.OverlayCost(1),vgf.RMonsterCondition)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=vgf.ReturnCard(g)
Duel.DisableShuffleCheck()
local off=1
local ops={}
local a=tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) and vgf.GetAvailableLocation(tp)>0
local b=tc:IsAbleToHand()
if not a and not b then return end
if a then
ops[off]=1152
off=off+1
end
if b then
ops[off]=1190
off=off+1
end
local sel=Duel.SelectOption(tp,table.unpack(ops))
if sel==0 and a then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK)
else
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local tg=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,1,nil,REASON_EFFECT)
Duel.SendtoGrave(tg,REASON_COST)
end
end
\ No newline at end of file
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.ContinuousSpell(c)
vgd.EffectTypeIgnition(c,m,LOCATION_ORDER,cm.operation,vgf.DamageCost(2))
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_VMONSTER)
local g=Duel.SelectMatchingCard(tp,vgf.VMonsterFilter,tp,LOCATION_MZONE,0,1,1,nil)
vgd.EffectTypeContinuousChangeAttack(c,EFFECT_TYPE_FIELD,5000,nil,cm.tg,g:GetFirst(),nil,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
function cm.tg(e,c)
return vgf.RMonsterFilter(c)
end
\ No newline at end of file
......@@ -32,22 +32,28 @@ function cm.con1(e,tp,eg,ep,ev,re,r,rp)
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local token1=Duel.CreateToken(tp,10800730)
local token2=Duel.CreateToken(tp,10800730)
local token3=Duel.CreateToken(tp,10800730)
local code=10800730
local selfcode1,selfcode2=c:GetOriginalCode()
if selfcode2==10800855 then code=code+1 end
local token1=Duel.CreateToken(tp,code)
local token2=Duel.CreateToken(tp,code)
local token3=Duel.CreateToken(tp,code)
local g=Group.FromCards(token1,token2,token3)
Duel.Sendto(g,tp,LOCATION_EMBLEM,POS_FACEUP_ATTACK,REASON_EFFECT)
end
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_EMBLEM,0,nil,10800730)<10
return Duel.GetTurnPlayer()==tp and Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_EMBLEM,0,nil,code)<10
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_EMBLEM,0,nil,10800730)>=10 then return end
local ct=10-Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_EMBLEM,0,nil,10800730)
local token1=Duel.CreateToken(tp,10800730)
local token2=Duel.CreateToken(tp,10800730)
local token3=Duel.CreateToken(tp,10800730)
local code=10800730
local selfcode1,selfcode2=c:GetOriginalCode()
if selfcode2==10800855 then code=code+1 end
if Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_EMBLEM,0,nil,code)>=10 then return end
local ct=10-Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_EMBLEM,0,nil,code)
local token1=Duel.CreateToken(tp,code)
local token2=Duel.CreateToken(tp,code)
local token3=Duel.CreateToken(tp,code)
local sg=Group.FromCards(token1,token2,token3)
local g=VgF.GetCardsFromGroup(sg,ct)
Duel.Sendto(g,tp,LOCATION_EMBLEM,POS_FACEUP_ATTACK,REASON_EFFECT)
......
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