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

Add files via upload

parent 19fa379a
......@@ -27,7 +27,7 @@ function VgD.RideUpFilter1(c,e,lv,code,rc)
if rc:IsAttribute(SKILL_SELF_RIDE) and c:IsCode(code) then
return false
end
return ((c:IsLevel(lv,lv+1) and c:IsLocation(LOCATION_HAND)) or (c:IsLevel(lv+1) and c:IsLocation(LOCATION_RIDE) and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,1))) and c:IsType(TYPE_MONSTER)
return ((c:IsLevel(lv,lv+1) and c:IsLocation(LOCATION_HAND)) or (c:IsLevel(lv+1) and c:IsLocation(LOCATION_RIDE) and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,1,nil))) and c:IsType(TYPE_MONSTER)
end
function VgD.DisCardRideUpFilter(c,e,lv,code,rc)
local tp=c:GetControler()
......@@ -482,10 +482,6 @@ function VgD.SendToGOperation(e,tp,eg,ep,ev,re,r,rp)
tc=VgF.ReturnCard(tc)
g:AddCard(tc)
end
local mg=c:GetOverlayGroup()
if mg:GetCount()>0 then
g:Merge(mg)
end
VgF.Sendto(LOCATION_GZONE,g,tp,POS_FACEUP,REASON_EFFECT)
end
function VgD.GToGraveOperation(e,tp,eg,ep,ev,re,r,rp)
......@@ -498,9 +494,8 @@ end
function VgD.MonsterAttackCondition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not VgF.VMonsterFilter(c) then return false end
local bc=c:GetBattleTarget()
local a=c:GetFlagEffectLabel(AttackTriggerFlag) and c:GetFlagEffectLabel(AttackTriggerFlag)>0
return bc and Duel.GetAttackTarget()==bc and a
return a and Duel.GetAttacker()==c
end
function VgD.MonsterAttackCost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -836,14 +836,18 @@ function VgF.SelectMatchingCard(hintmsg,e,select_tp,f,tp,loc_self,loc_op,int_min
if g2:GetCount()>0 then g:Merge(g2) end
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,select_tp,hintmsg)
g=g:FilterSelect(select_tp,f,int_min,int_max,except_g,...)
if VgF.GetValueType(f)=="function" then
g=g:FilterSelect(select_tp,f,int_min,int_max,except_g,...)
else
g=g:Select(select_tp,int_min,int_max,except_g)
end
end
if a then Duel.ShuffleDeck(select_tp) end
return g
end
function VgF.Sendto(loc,sg,...)
local function AddOverlayGroup(g)
for tc in VgF.Next(sg) do
for tc in VgF.Next(g) do
if tc:GetOverlayCount()>0 then
local mg=tc:GetOverlayGroup()
g:Merge(mg)
......@@ -855,6 +859,7 @@ function VgF.Sendto(loc,sg,...)
g=Group.Clone(sg)
elseif VgF.GetValueType(sg)=="Card" then
g=Group.FromCards(sg)
else return 0
end
if loc==LOCATION_GRAVE then
AddOverlayGroup(g)
......@@ -870,23 +875,25 @@ function VgF.Sendto(loc,sg,...)
AddOverlayGroup(g)
return Duel.Exile(g,...)
elseif loc==LOCATION_OVERLAY then
local tc=VgF.ReturnCard(sg)
AddOverlayGroup(g)
local list={...}
local c=list[1]
Duel.Overlay(c,tc)
Duel.Overlay(c,g)
elseif loc==LOCATION_TRIGGER then
local tc=VgF.ReturnCard(sg)
Duel.MoveToField(tc,...)
else
local loclist={LOCATION_GZONE,LOCATION_ORDER,LOCATION_DAMAGE,LOCATION_SPARE,LOCATION_EMBLEM}
for i,v in ipairs{loclist} do
if loc==v then
AddOverlayGroup(g)
local list={...}
local tp=list[1]
table.remove(list,1)
return Duel.Sendto(g,tp,loc,...)
end
AddOverlayGroup(g)
local list={...}
local move_tp=list[1]
local target_tp=list[2]
table.remove(list,1)
table.remove(list,1)
for tc in VgF.Next(g) do
Duel.MoveToField(tc,move_tp,target_tp,loc,...)
end
elseif (loc|0xf800>0) then
AddOverlayGroup(g)
local list={...}
local tp=list[1]
table.remove(list,1)
return Duel.Sendto(g,tp,loc,...)
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