Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 毒蛇の怨念 #2861

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 10 additions & 16 deletions c1683982.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,22 @@ function c1683982.initial_effect(c)
c:RegisterEffect(e2)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetDescription(aux.Stringid(1683982,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_BATTLE_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,1683982)
e3:SetCondition(c1683982.regcon)
e3:SetOperation(c1683982.regop)
e3:SetTarget(c1683982.sptg)
e3:SetOperation(c1683982.spop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCondition(c1683982.regcon2)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(1683982,1))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e5:SetCode(EVENT_CUSTOM+1683982)
e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(1,1683982)
e5:SetTarget(c1683982.sptg)
e5:SetOperation(c1683982.spop)
c:RegisterEffect(e5)
--return to grave
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(1683982,2))
Expand All @@ -57,7 +51,7 @@ function c1683982.atktg(e,c)
return not c:IsRace(RACE_REPTILE)
end
function c1683982.cfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousRaceOnField()&RACE_REPTILE~=0
return c:IsPreviousControler(tp) and c:IsReason(REASON_BATTLE) and c:GetPreviousRaceOnField()&RACE_REPTILE~=0
end
function c1683982.regcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c1683982.cfilter,1,nil,tp)
Expand Down