Commit ed31b28f authored by wind2009's avatar wind2009

Fix サイコガンナーMk-Ⅱ

parent 81e883f1
No preview for this file type
......@@ -23,6 +23,7 @@ function s.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_MAIN_END)
e2:SetCountLimit(1,id)
e2:SetCondition(s.rmcon)
e2:SetCost(s.rmcost)
......@@ -43,12 +44,12 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if tc:IsRelateToChain() then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
return Duel.IsMainPhase()
end
function s.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
......@@ -71,8 +72,11 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.Recover(tp,tc:GetBaseAttack(),REASON_EFFECT)
if tc:IsRelateToChain() and tc:IsType(TYPE_MONSTER) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 then
local atk=tc:GetTextAttack()
if atk>0 then
Duel.BreakEffect()
Duel.Recover(tp,atk,REASON_EFFECT)
end
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