Commit 3b0638ae authored by a597449807's avatar a597449807 Committed by GitHub

fix corresponding race (#2651)

修复该类效果送墓前后都要求满足对应种族条件才能发动的问题。
Q:「フィールドで植物族になっている、元々は別の種族のモンスター」が破壊された時に発動しますか?
  また、「フィールドで別の種族になっている、元々は植物族のモンスター」が破壊された時に発動しますか?
A:いいえ、どちらの場合も発動しません。(16/12/14)
Tag: 《姫葵マリーナ》
parent 6cc70531
...@@ -58,7 +58,7 @@ function c1683982.atktg(e,c) ...@@ -58,7 +58,7 @@ function c1683982.atktg(e,c)
end end
function c1683982.cfilter(c,tp) function c1683982.cfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE)
and c:GetPreviousRaceOnField()&RACE_REPTILE~=0 and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousRaceOnField()&RACE_REPTILE~=0 and c:IsRace(RACE_REPTILE) and c:IsPreviousPosition(POS_FACEUP)
end end
function c1683982.regcon(e,tp,eg,ep,ev,re,r,rp) function c1683982.regcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c1683982.cfilter,1,nil,tp) return eg:IsExists(c1683982.cfilter,1,nil,tp)
......
...@@ -27,7 +27,7 @@ function c29177818.initial_effect(c) ...@@ -27,7 +27,7 @@ function c29177818.initial_effect(c)
end end
function c29177818.cfilter(c,tp) function c29177818.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsPreviousPosition(POS_FACEUP) return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsPreviousPosition(POS_FACEUP)
and bit.band(c:GetPreviousRaceOnField(),RACE_PLANT)>0 and bit.band(c:GetPreviousRaceOnField(),RACE_PLANT)>0 and c:IsRace(RACE_PLANT)
end end
function c29177818.spcon(e,tp,eg,ep,ev,re,r,rp) function c29177818.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c29177818.cfilter,1,nil,tp) return eg:IsExists(c29177818.cfilter,1,nil,tp)
......
...@@ -70,7 +70,7 @@ end ...@@ -70,7 +70,7 @@ end
function s.cfilter(c,tp,lc) function s.cfilter(c,tp,lc)
local seq=c:GetPreviousSequence() local seq=c:GetPreviousSequence()
if c:IsPreviousControler(1-tp) then seq=seq+16 end if c:IsPreviousControler(1-tp) then seq=seq+16 end
return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousRaceOnField()&RACE_DINOSAUR>0 return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousRaceOnField()&RACE_DINOSAUR>0 and c:IsRace(RACE_DINOSAUR)
and c:IsPreviousLocation(LOCATION_MZONE) and bit.extract(lc:GetLinkedZone(),seq)>0 and c:IsPreviousLocation(LOCATION_MZONE) and bit.extract(lc:GetLinkedZone(),seq)>0
end end
function s.drcon(e,tp,eg,ep,ev,re,r,rp) function s.drcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -17,7 +17,7 @@ function c78540593.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -17,7 +17,7 @@ function c78540593.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst() local tc=eg:GetFirst()
return eg:GetCount()==1 and tc:IsReason(REASON_DESTROY) and tc:IsReason(REASON_BATTLE+REASON_EFFECT) return eg:GetCount()==1 and tc:IsReason(REASON_DESTROY) and tc:IsReason(REASON_BATTLE+REASON_EFFECT)
and tc:IsPreviousLocation(LOCATION_MZONE) and tc:IsPreviousControler(tp) and tc:IsPreviousLocation(LOCATION_MZONE) and tc:IsPreviousControler(tp)
and bit.band(tc:GetPreviousRaceOnField(),RACE_PLANT)~=0 and bit.band(tc:GetPreviousRaceOnField(),RACE_PLANT)~=0 and tc:IsRace(RACE_PLANT)
end end
function c78540593.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c78540593.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end
......
...@@ -28,7 +28,7 @@ function c80839052.initial_effect(c) ...@@ -28,7 +28,7 @@ function c80839052.initial_effect(c)
end end
function c80839052.spfilter(c,tp) function c80839052.spfilter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp)
and (c:GetPreviousRaceOnField()&RACE_ROCK)>0 and (c:GetPreviousRaceOnField()&RACE_ROCK)>0 and c:IsRace(RACE_ROCK)
end end
function c80839052.spcon(e,tp,eg,ep,ev,re,r,rp) function c80839052.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c80839052.spfilter,1,nil,tp) return eg:IsExists(c80839052.spfilter,1,nil,tp)
......
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