Commit 90a56480 authored by POLYMER's avatar POLYMER

fix

parent c212ddc2
......@@ -117,6 +117,7 @@ function cm.atktg(e,c)
return cm.atkfilter(c)
end
function cm.atkval(e,c)
local tp=e:GetHandlerPlayer()
return 500*Duel.GetMatchingGroupCount(cm.atkfilter,tp,LOCATION_MZONE,0,nil)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -124,6 +124,7 @@ function cm.initial_effect(c)
if res and aux.GetValueType(re)=="Effect" then
local rc=re:GetHandler()
if rc and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) and re:GetDescription()==aux.Stringid(m,0) then
rc:ResetFlagEffect(m)
rc:SetStatus(STATUS_ACTIVATE_DISABLED,true)
end
end
......@@ -217,7 +218,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetCountLimit(1)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ev==ev0 end)
e1:SetOperation(cm.rsop)
......@@ -240,10 +241,9 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if e:GetCode()==EVENT_CHAIN_SOLVING and rc:IsRelateToEffect(re) then
if e:GetCode()==EVENT_CHAIN_SOLVED and rc:IsRelateToEffect(re) then
rc:SetStatus(STATUS_EFFECT_ENABLED,true)
end
if e:GetCode()==EVENT_CHAIN_NEGATED then rc:ResetFlagEffect(m) end
if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) then
rc:SetStatus(STATUS_ACTIVATE_DISABLED,true)
rc:CancelToGrave(false)
......@@ -261,6 +261,8 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.mvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tc=Duel.SelectMatchingCard(tp,cm.mvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp):GetFirst()
local prop=e:GetProperty()
e:SetProperty(prop|EFFECT_FLAG_IGNORE_IMMUNE)
if tc and tc:IsControler(tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
......@@ -269,6 +271,7 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
elseif tc then
Duel.GetControl(tc,tp)
end
e:SetProperty(prop)
end
function cm.d2hmatchfilter(c,cd)
return c:IsFaceup() and c:IsCode(cd)
......
......@@ -40,7 +40,10 @@ function cm.SpiritReturnReg(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst()
if not tc then return end
local pos=Duel.SelectPosition(tp,tc,0xd&~tc:GetPosition())
local prop=e:GetProperty()
e:SetProperty(prop|EFFECT_FLAG_IGNORE_IMMUNE)
Duel.ChangePosition(tc,pos)
e:SetProperty(prop)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetDescription(1104)
......
......@@ -75,8 +75,11 @@ function cm.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local tc2=Duel.SelectMatchingCard(tp,cm.cpfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp,tc):GetFirst()
local pos=tc:GetPosition()
local prop=e:GetProperty()
e:SetProperty(prop|EFFECT_FLAG_IGNORE_IMMUNE)
Duel.ChangePosition(tc,tc2:GetPosition())
Duel.ChangePosition(tc2,pos)
e:SetProperty(prop)
end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.smfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
......
......@@ -75,6 +75,7 @@ function c11561016.hxop(e,tp,eg,ep,ev,re,r,rp)
chk=1
end
end
Duel.DisableShuffleCheck()
Duel.SendtoHand(msg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,msg)
if a>0 and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,a,nil) then
......@@ -91,7 +92,7 @@ function c11561016.hxop(e,tp,eg,ep,ev,re,r,rp)
local g2=Duel.GetOperatedGroup()
local a2=Group.GetCount(g2)
if not (a2<math.floor(a1/2)) then
if not (a2<math.floor(a1/2)) then
Duel.Draw(tp,1,REASON_EFFECT) end
end
end
......
......@@ -2824,7 +2824,14 @@ function cm.AllEffectRstop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
reg(sc,se,bool)
local e1=Effect.CreateEffect(sc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(0xff)
e1:SetCode(53702701)
e1:SetLabelObject(se)
reg(sc,e1,true)
return reg(sc,se,bool)
end
--[[AD_Avoid_RegisterEffect=Duel.RegisterEffect
Duel.RegisterEffect=function(...)
......@@ -2834,7 +2841,11 @@ function cm.AllEffectRstop(e,tp,eg,ep,ev,re,r,rp)
if tc.initial_effect then
local ini=cm.initial_effect
cm.initial_effect=function() end
tc:ReplaceEffect(m,0)
if tc:GetFlagEffect(53702700)>0 then
local le={tc:IsHasEffect(53702701)}
for _,v in pairs(le) do v:GetLabelObject():Reset() v:Reset() end
return 0
else return tc:ReplaceEffect(m,0) end
cm.initial_effect=ini
tc.initial_effect(tc)
end
......
......@@ -15,7 +15,6 @@ function cm.initial_effect(c)
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(cm.tgcon)
e2:SetTarget(cm.tgtg)
e2:SetOperation(cm.tgop)
......
......@@ -6,7 +6,6 @@ function cm.initial_effect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCost(cm.regcost)
e1:SetTarget(cm.regtg)
......
This diff is collapsed.
......@@ -33,9 +33,9 @@ function c71401002.filter2a(c)
end
function c71401002.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local check=Duel.GetLocationCount(tp,LOCATION_SZONE)>0
return Duel.IsExistingMatchingCard(c71401002.filter2a,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) and Duel.IsExistingMatchingCard(c71401002.filter2,tp,LOCATION_DECK,0,1,nil,tp,check)
return Duel.IsExistingMatchingCard(c71401002.filter2a,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
end
return true
end
function c71401002.op2(e,tp,eg,ep,ev,re,r,rp)
local check=Duel.GetLocationCount(tp,LOCATION_SZONE)>0
......
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