Commit 7c18a1ef authored by xiaoye's avatar xiaoye

fix

parent 8d348b71
......@@ -341,7 +341,7 @@ function cm.initial_effect(c)
vgd.EffectTypeContinuousChangeDefense(c,m,EFFECT_TYPE_SINGLE,5000,cm.con)
end
function cm.con(e)
local tp=e:GetHandler()
local tp=e:GetHandlerPlayer()
return vgf.IsExistingMatchingCard(cm.filter,tp,LOCATION_ORDER,0,2,nil)
end
function cm.filter(c)
......
......@@ -1050,7 +1050,10 @@ function VgF.SelectMatchingCard(hintmsg,e,select_tp,f,tp,loc_self,loc_op,int_min
local cg=g:Filter(function (tc)
return not tc:IsLocation(LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA)
end,nil)
if cg:GetCount()>0 then Duel.HintSelection(cg) end
if cg:GetCount()>0 then
Duel.HintSelection(cg)
Duel.SetTargetCard(cg)
end
if a then Duel.ShuffleDeck(select_tp) end
return g
end
......
......@@ -6,7 +6,7 @@ function cm.initial_effect(c)
vgd.TriggerCountUp(c,m,1)
end
function cm.con(e,c)
local tp=e:GetHandler()
local tp=e:GetHandlerPlayer()
return Duel.GetTurnPlayer()==tp and vgf.VMonsterCondition(e) and vgf.IsExistingMatchingCard(cm.filter,tp,LOCATION_ORDER,0,1,nil)
end
function cm.filter(c)
......
......@@ -5,7 +5,7 @@ function cm.initial_effect(c)
vgd.EffectTypeContinuousChangeDefense(c,m,EFFECT_TYPE_SINGLE,5000,con)
end
function cm.con(e,c)
local tp=e:GetHandler()
local tp=e:GetHandlerPlayer()
return vgf.IsExistingMatchingCard(cm.filter,tp,LOCATION_ORDER,0,1,nil)
end
function cm.filter(c)
......
......@@ -6,7 +6,7 @@ function cm.initial_effect(c)
vgd.EffectTypeTrigger(c,m,nil,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.op,vgf.OverlayCost(1),vgf.RSummonCondition)
end
function cm.con(e)
local tp=e:GetHandler()
local tp=e:GetHandlerPlayer()
return vgf.IsExistingMatchingCard(cm.filter,tp,LOCATION_ORDER,0,2,nil)
end
function cm.filter(c)
......
......@@ -4,7 +4,7 @@ function cm.initial_effect(c)
vgd.EffectTypeContinuousChangeAttack(c,m,EFFECT_TYPE_SINGLE,2000,cm.con)
end
function cm.con(e,c)
local tp=e:GetHandler()
local tp=e:GetHandlerPlayer()
return vgf.IsExistingMatchingCard(cm.filter,tp,LOCATION_ORDER,0,1,nil) and Duel.GetAttacker()==e:GetHandler() and vgf.RMonsterCondition(e)
end
function cm.filter(c)
......
......@@ -8,7 +8,7 @@ function cm.filter(c)
return c:IsSetCard(0x5040)
end
function cm.con(e)
local tp=e:GetHandler()
local tp=e:GetHandlerPlayer()
local c=e:GetHandler()
return (Duel.IsPlayerAffectedByEffect(tp,AFFECT_CODE_NIGHT) or Duel.IsPlayerAffectedByEffect(tp,AFFECT_CODE_DEEP_NIGHT))
and (Duel.GetAttacker()==e:GetHandler() or c:GetFlagEffect(FLAG_SUPPORT)>0)
......
local cm,m,o=GetID()
function cm.initial_effect(c)
vgf.VgCard(c)
vgd.EffectTypeContinuousChangeAttack(c,m,EFFECT_TYPE_SINGLE,5000,cm.con)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_FIELD,EVENT_SPSUMMON_SUCCESS,cm.op,nil,cm.con2)
end
function cm.con(e,c)
local tp=e:GetHandlerPlayer()
return Duel.GetTurnPlayer()==tp and vgf.RMonsterCondition(e) and vgf.IsExistingMatchingCard(cm.filter,tp,LOCATION_ORDER,0,2,nil)
end
function cm.filter(c)
return c:GetFlagEffect(FLAG_IMPRISON)>0
end
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return vgf.RMonsterCondition(e) and vgf.FrontFilter(c) and eg:IsExists(cm.filter2,1,nil,tp)
end
function cm.filter2(c,tp)
return c:IsPreviousLocation(LOCATION_ORDER) and c:IsPreviousControler(tp) and c:IsControler(1-tp) and vgf.IsSummonTypeR(c)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=eg:Filter(cm.filter2,nil,tp)
vgf.AtkUp(c,g,-5000)
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_FIELD,EVENT_CHANGE_POS,cm.op,nil,cm.con,nil,1)
vgd.GlobalCheckEffect(c,m,EVENT_SPSUMMON_SUCCESS,cm.checkcon)
cm.is_has_continuous=true
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_ADD_SKILL)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(SKILL_SUPPORT)
e1:SetCondition(cm.condition)
c:RegisterEffect(e1)
end
function cm.checkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsSummonType,1,nil,SUMMON_TYPE_SELFRIDE)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)>0 and vgf.RMonsterCondition(e)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPosition(POS_FACEUP_ATTACK) and eg:IsExists(Card.IsControler,1,c,tp) and Duel.GetCurrentPhase()~=PHASE_DRAW
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.ChangePosition(c,POS_FACEUP_ATTACK)
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,vgf.SearchCard(LOCATION_MZONE,LOCATION_OVERLAY,Card.IsSetCard,1,1,0x78),nil,vgf.VSummonCondition)
vgd.EffectTypeIgnition(c,m,LOCATION_MZONE,cm.op,cm.cost,nil,nil,1)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=vgf.SelectMatchingCard(HINTMSG_LEAVEFIELD,e,tp,vgf.RMonsterFilter,tp,0,LOCATION_MZONE,2,2,nil)
vgf.Sendto(LOCATION_DROP,g,REASON_EFFECT)
vgf.AtkUp(c,c,10000)
vgf.StarUp(c,c,1)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return vgf.DamageCost(1)(e,tp,eg,ep,ev,re,r,rp,chk) and vgf.IsExistingMatchingCard(vgf.RMonsterFilter,tp,LOCATION_MZONE,0,3,nil) end
vgf.DamageCost(1)(e,tp,eg,ep,ev,re,r,rp,chk)
local g=vgf.SelectMatchingCard(HINTMSG_RMONSTER,e,tp,vgf.RMonsterFilter,tp,LOCATION_MZONE,0,3,3,nil)
vgf.Sendto(LOCATION_DROP,g,REASON_COST)
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.op,vgf.OverlayCost(1),cm.con)
vgd.EffectTypeTrigger(c,m,LOCATION_MZONE,EFFECT_TYPE_SINGLE,EVENT_BECOME_TARGET,cm.op2,nil,cm.con2,nil,1)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return vgf.RSummonCondition(e) and vgf.GetVMonster(tp):IsCode(10104001)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=vgf.SelectMatchingCard(HINTMSG_RMONSTER,e,tp,vgf.RMonsterFilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=vgf.ReturnCard(g)
if tc then
vgf.AtkUp(c,tc,5000)
tc:RegisterFlagEffect(FLAG_ATTACK_AT_REAR,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
end
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler()) and vgf.VMonsterFilter(re:GetHandler()) and vgf.RMonsterCondition(e)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
vgf.AtkUp(c,c,5000)
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