Commit 5991eeeb authored by mercury233's avatar mercury233 Committed by GitHub

fix Psi-Beast

parent 84b60993
......@@ -10,20 +10,20 @@ function c46291010.initial_effect(c)
e1:SetOperation(c46291010.rmop)
c:RegisterEffect(e1)
end
function c46291010.filter(c,lv)
return c:IsRace(RACE_PSYCHO) and not c:IsLevel(lv) and c:IsLevelAbove(1) and c:IsAbleToRemove()
function c46291010.filter(c)
return c:IsRace(RACE_PSYCHO) and c:IsLevelAbove(1) and c:IsAbleToRemove()
end
function c46291010.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c46291010.filter,tp,LOCATION_DECK,0,1,nil,e:GetHandler():GetLevel()) end
if chk==0 then return Duel.IsExistingMatchingCard(c46291010.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c46291010.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c46291010.filter,tp,LOCATION_DECK,0,1,1,nil,c:GetLevel())
local g=Duel.SelectMatchingCard(tp,c46291010.filter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc and c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
if tc and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0
and c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
......
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