Commit e239e686 authored by VanillaSalt's avatar VanillaSalt

fix

parent 88e52aac
......@@ -1353,7 +1353,7 @@ int32 field::process_phase_event(int16 step, int32 phase) {
pr = effects.continuous_effect.equal_range(phase_event);
for(; pr.first != pr.second; ++pr.first) {
peffect = pr.first->second;
if(!peffect->is_activateable(check_player, nil_event))
if(peffect->get_handler_player() != check_player || !peffect->is_activateable(check_player, nil_event))
continue;
peffect->id = infos.field_id++;
newchain.triggering_effect = peffect;
......@@ -1521,7 +1521,7 @@ int32 field::process_phase_event(int16 step, int32 phase) {
pr = effects.continuous_effect.equal_range(phase_event);
for(; pr.first != pr.second; ++pr.first) {
peffect = pr.first->second;
if(!peffect->is_activateable(check_player, nil_event))
if(peffect->get_handler_player() != check_player || !peffect->is_activateable(check_player, nil_event))
continue;
peffect->id = infos.field_id++;
newchain.triggering_effect = peffect;
......
......@@ -29,7 +29,7 @@ function c2009101.spcon(e,c)
Duel.IsExistingMatchingCard(c2009101.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c2009101.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsFaceup() and chkc:GetLocation()==LOCATION_MZONE end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
......
......@@ -53,7 +53,7 @@ function c20366274.ffilter1(c)
return c:IsSetCard(0x9d)
end
function c20366274.ffilter2(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) or (c:GetFlagEffect(4904633)~=0 and not c:IsStatus(STATUS_DISABLED))
return c:IsAttribute(ATTRIBUTE_LIGHT) or c:IsHasEffect(4904633)~=0
end
function c20366274.exfilter(c,g)
return c:IsFaceup() and c:IsCanBeFusionMaterial() and not g:IsContains(c)
......
......@@ -29,7 +29,8 @@ function c39153655.initial_effect(c)
c:RegisterEffect(e3)
end
function c39153655.filter(c)
return c:IsFaceup() and c:IsSetCard(0xaf) and c:GetLevel()~=4
local lv=c:GetLevel()
return c:IsFaceup() and c:IsSetCard(0xaf) and lv>0 and lv~=4
end
function c39153655.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c39153655.filter(chkc) end
......@@ -40,7 +41,7 @@ end
function c39153655.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:GetLevel()~=4 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
......
......@@ -45,7 +45,7 @@ function c48424886.ffilter1(c)
return c:IsSetCard(0x9d)
end
function c48424886.ffilter2(c)
return c:IsAttribute(ATTRIBUTE_FIRE) or (c:GetFlagEffect(4904633)~=0 and not c:IsStatus(STATUS_DISABLED))
return c:IsAttribute(ATTRIBUTE_FIRE) or c:IsHasEffect(4904633)~=0
end
function c48424886.exfilter(c,g)
return c:IsFaceup() and c:IsCanBeFusionMaterial() and not g:IsContains(c)
......
......@@ -34,7 +34,11 @@ function c4904633.activate(e,tp,eg,ep,ev,re,r,rp)
c:AddTrapMonsterAttribute(TYPE_EFFECT,ATTRIBUTE_DARK,RACE_SPELLCASTER,9,1450,1950)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
c:TrapMonsterBlock()
c:RegisterFlagEffect(4904633,RESET_EVENT+0x1fe0000,0,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(4904633)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
end
function c4904633.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT) and not e:GetHandler():IsReason(REASON_RETURN)
......
......@@ -79,11 +79,16 @@ end
function c51447164.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 then
c:RegisterFlagEffect(51447164,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,2)
if Duel.GetCurrentPhase()==PHASE_STANDBY then
c:RegisterFlagEffect(51447164,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY,0,2,Duel.GetTurnCount())
else
c:RegisterFlagEffect(51447164,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY,0,1)
end
end
end
function c51447164.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(51447164)~=0
local label=e:GetHandler():GetFlagEffectLabel(51447164)
return label and label~=Duel.GetTurnCount()
end
function c51447164.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -46,7 +46,7 @@ function c74822425.ffilter1(c)
return c:IsSetCard(0x9d)
end
function c74822425.ffilter2(c)
return c:IsAttribute(ATTRIBUTE_EARTH) or (c:GetFlagEffect(4904633)~=0 and not c:IsStatus(STATUS_DISABLED))
return c:IsAttribute(ATTRIBUTE_EARTH) or c:IsHasEffect(4904633)~=0
end
function c74822425.exfilter(c,g)
return c:IsFaceup() and c:IsCanBeFusionMaterial() and not g:IsContains(c)
......
......@@ -57,7 +57,7 @@ function c94977269.ffilter1(c)
return c:IsSetCard(0x9d)
end
function c94977269.ffilter2(c)
return c:IsAttribute(ATTRIBUTE_DARK) or (c:GetFlagEffect(4904633)~=0 and not c:IsStatus(STATUS_DISABLED))
return c:IsAttribute(ATTRIBUTE_DARK) or c:IsHasEffect(4904633)~=0
end
function c94977269.exfilter(c,g)
return c:IsFaceup() and c:IsCanBeFusionMaterial() and not g:IsContains(c)
......
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