Commit 33d78bca authored by salix5's avatar salix5

fix 海竜神-リバイアサン

see #1989
parent 4e2481a0
......@@ -10,14 +10,13 @@ function c23931679.initial_effect(c)
e1:SetTarget(c23931679.thtg)
e1:SetOperation(c23931679.thop)
c:RegisterEffect(e1)
--adjust
--mark
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EVENT_ADJUST)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(23931679)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c23931679.condition)
e2:SetOperation(c23931679.adjustop)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
c:RegisterEffect(e2)
--cannot summon,spsummon,flipsummon
local e3=Effect.CreateEffect(c)
......@@ -35,6 +34,16 @@ function c23931679.initial_effect(c)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e5)
if not c23931679.global_check then
c23931679.global_check=true
--adjust
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
ge1:SetCode(EVENT_ADJUST)
ge1:SetOperation(c23931679.adjustop)
Duel.RegisterEffect(ge1,0)
end
end
c23931679[0]=0
c23931679[1]=0
......@@ -70,6 +79,11 @@ function c23931679.tgselect(sg,g)
return #(g-sg)==1 and not sg:IsExists(c23931679.rmfilter,1,nil,ATTRIBUTE_WATER)
end
function c23931679.adjustop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerAffectedByEffect(0,23931679) then
c23931679[0]=0
c23931679[1]=0
return
end
local phase=Duel.GetCurrentPhase()
if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL then return end
local g1=Duel.GetMatchingGroup(c23931679.wtfilter,tp,LOCATION_MZONE,0,nil)
......
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