Commit 4ab73638 authored by Chrono-Genex's avatar Chrono-Genex Committed by GitHub

fix Chaosrider Gustaph (#1730)

* fix

* fix
parent a89f46ee
...@@ -4,7 +4,6 @@ function c47829960.initial_effect(c) ...@@ -4,7 +4,6 @@ function c47829960.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(47829960,0)) e1:SetDescription(aux.Stringid(47829960,0))
e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
...@@ -15,15 +14,14 @@ end ...@@ -15,15 +14,14 @@ end
function c47829960.filter(c) function c47829960.filter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToRemove() return c:IsType(TYPE_SPELL) and c:IsAbleToRemove()
end end
function c47829960.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c47829960.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c47829960.filter(chkc) end if chk==0 then return Duel.IsExistingMatchingCard(c47829960.filter,tp,LOCATION_GRAVE,0,1,nil) end
if chk==0 then return Duel.IsExistingTarget(c47829960.filter,tp,LOCATION_GRAVE,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c47829960.filter,tp,LOCATION_GRAVE,0,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),tp,LOCATION_GRAVE)
end end
function c47829960.operation(e,tp,eg,ep,ev,re,r,rp) function c47829960.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c47829960.filter),tp,LOCATION_GRAVE,0,1,2,nil)
if #g>0 then
local count=Duel.Remove(g,POS_FACEUP,REASON_EFFECT) local count=Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
local c=e:GetHandler() local c=e:GetHandler()
if count>0 and c:IsFaceup() and c:IsRelateToEffect(e) then if count>0 and c:IsFaceup() and c:IsRelateToEffect(e) then
...@@ -34,4 +32,5 @@ function c47829960.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,4 +32,5 @@ function c47829960.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,2) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end
end end
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