Commit 9eb5ee84 authored by Huangnan's avatar Huangnan

fix

parent 77150787
Pipeline #40936 failed with stages
in 8 minutes and 15 seconds
......@@ -80,12 +80,13 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
local g=og:Select(tp,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
Duel.RaiseSingleEvent(c,EVENT_DETACH_MATERIAL,e,0,0,0,0)
g:KeepAlive()
Duel.RaiseSingleEvent(e:GetHandler(),EVENT_DETACH_MATERIAL,e,0,0,0,0)
e:SetLabelObject(g)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsCostChecked() end
local ct=e:GetLabelObject():GetCount()
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1200*ct)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1200*ct)
......@@ -99,7 +100,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if #tg>0 then
local tc=tg:GetFirst()
while tc do
local e2=Effect.CreateEffect(c)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
......
......@@ -10,6 +10,14 @@ function s.initial_effect(c)
e2:SetTarget(s.target)
e2:SetValue(s.atkval)
c:RegisterEffect(e2)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_UPDATE_DEFENSE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(s.target)
e4:SetValue(s.atkval)
c:RegisterEffect(e4)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
......
......@@ -74,7 +74,7 @@ function c16311065.tg2f1(c,e,tp)
and Duel.IsExistingMatchingCard(c16311065.tg2f2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,c:GetDefense(),c:GetRace())
end
function c16311065.tg2f2(c,e,tp,def,race)
return c:IsSetCard(0x5dc6) and c:GetDefense()<def and c:IsRace(race)
return c:IsSetCard(0x5dc6) and c:IsDefenseBelow(def) and c:IsRace(race)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16311065.tg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -50,7 +50,7 @@ function c50224150.costfilter(c,tp)
return c:IsControler(tp) or c:IsFaceup()
end
function c50224150.gcheck(g,e,tp)
return g:IsExists(Card.IsSummonType,1,nil,SUMMON_TYPE_NORMAL)
return g:IsExists(Card.IsSummonType,1,nil,SUMMON_TYPE_NORMAL) and Duel.GetMZoneCount(tp,g)>0
end
function c50224150.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetReleaseGroup(tp,false):Filter(c50224150.costfilter,nil,tp)
......@@ -61,8 +61,7 @@ function c50224150.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c50224150.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c50224150.spop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -140,8 +140,8 @@ function c50224910.spsop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c50224910.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c50224910.thop(e,tp,eg,ep,ev,re,r,rp)
......
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