Commit 1ce942e2 authored by salix5's avatar salix5
parent bf9de139
...@@ -200,8 +200,8 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con ...@@ -200,8 +200,8 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
if(handler->is_affected_by_effect(EFFECT_CANNOT_TRIGGER)) if(handler->is_affected_by_effect(EFFECT_CANNOT_TRIGGER))
return FALSE; return FALSE;
} else if(!(type & EFFECT_TYPE_CONTINUOUS)) { } else if(!(type & EFFECT_TYPE_CONTINUOUS)) {
if((handler->current.location & (LOCATION_ONFIELD | LOCATION_REMOVED)) if((handler->current.location & (LOCATION_ONFIELD | LOCATION_REMOVED)) && (code != EVENT_FLIP && !(flag & EFFECT_FLAG_SET_AVAILABLE))
&& (code != EVENT_FLIP) && (!handler->is_position(POS_FACEUP) || !handler->is_status(STATUS_EFFECT_ENABLED))) && (!handler->is_position(POS_FACEUP) || !handler->is_status(STATUS_EFFECT_ENABLED)))
return FALSE; return FALSE;
if(!(type & (EFFECT_TYPE_FLIP | EFFECT_TYPE_TRIGGER_F)) if(!(type & (EFFECT_TYPE_FLIP | EFFECT_TYPE_TRIGGER_F))
&& !((type & EFFECT_TYPE_SINGLE) && (code == EVENT_TO_GRAVE || code == EVENT_DESTROYED || code == EVENT_SPSUMMON_SUCCESS))) { && !((type & EFFECT_TYPE_SINGLE) && (code == EVENT_TO_GRAVE || code == EVENT_DESTROYED || code == EVENT_SPSUMMON_SUCCESS))) {
...@@ -239,7 +239,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con ...@@ -239,7 +239,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
pduel->game_field->core.reason_effect = this; pduel->game_field->core.reason_effect = this;
pduel->game_field->core.reason_player = playerid; pduel->game_field->core.reason_player = playerid;
int32 result = TRUE; int32 result = TRUE;
if(!(type & EFFECT_TYPE_CONTINUOUS) ) if(!(type & EFFECT_TYPE_CONTINUOUS))
result = is_action_check(playerid); result = is_action_check(playerid);
if(result) if(result)
result = is_activate_ready(playerid, e, neglect_cond, neglect_cost, neglect_target); result = is_activate_ready(playerid, e, neglect_cond, neglect_cost, neglect_target);
......
...@@ -6,14 +6,14 @@ function c65240384.initial_effect(c) ...@@ -6,14 +6,14 @@ function c65240384.initial_effect(c)
e1:SetCode(EVENT_DAMAGE_STEP_END) e1:SetCode(EVENT_DAMAGE_STEP_END)
e1:SetOperation(c65240384.posop) e1:SetOperation(c65240384.posop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if not c65240384.global_check then local e2=Effect.CreateEffect(c)
c65240384.global_check=true e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_F)
local ge=Effect.CreateEffect(c) e2:SetCode(EVENT_CHAINING)
ge:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_SET_AVAILABLE)
ge:SetCode(EVENT_CHAIN_ACTIVATING) e2:SetRange(LOCATION_MZONE)
ge:SetOperation(c65240384.negop) e2:SetCondition(c65240384.negcon)
Duel.RegisterEffect(ge,0) e2:SetOperation(c65240384.negop)
end c:RegisterEffect(e2)
end end
function c65240384.posop(e,tp,eg,ep,ev,re,r,rp) function c65240384.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -21,15 +21,16 @@ function c65240384.posop(e,tp,eg,ep,ev,re,r,rp) ...@@ -21,15 +21,16 @@ function c65240384.posop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangePosition(c,POS_FACEUP_ATTACK) Duel.ChangePosition(c,POS_FACEUP_ATTACK)
end end
end end
function c65240384.negop(e,tp,eg,ep,ev,re,r,rp) function c65240384.negcon(e,tp,eg,ep,ev,re,r,rp)
if re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then if re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g then return end return tg:GetCount()==1 and tg:GetFirst()==e:GetHandler() and e:GetHandler():IsFacedown()
local tc=g:GetFirst() else
if g:GetCount()==1 and tc:IsCode(65240384) and tc:IsLocation(LOCATION_MZONE) return false
and tc:IsFacedown() and tc:IsDefencePos() then end
Duel.ChangePosition(tc,POS_FACEUP_DEFENCE) end
Duel.NegateActivation(ev) function c65240384.negop(e,tp,eg,ep,ev,re,r,rp)
end if Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENCE) then
Duel.NegateActivation(ev)
end end
end end
...@@ -9,14 +9,14 @@ function c75487237.initial_effect(c) ...@@ -9,14 +9,14 @@ function c75487237.initial_effect(c)
e1:SetTarget(c75487237.target) e1:SetTarget(c75487237.target)
e1:SetOperation(c75487237.operation) e1:SetOperation(c75487237.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if not c75487237.global_check then local e2=Effect.CreateEffect(c)
c75487237.global_check=true e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_F)
local ge=Effect.CreateEffect(c) e2:SetCode(EVENT_CHAINING)
ge:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_SET_AVAILABLE)
ge:SetCode(EVENT_CHAIN_ACTIVATING) e2:SetRange(LOCATION_MZONE)
ge:SetOperation(c75487237.negop) e2:SetCondition(c75487237.negcon)
Duel.RegisterEffect(ge,0) e2:SetOperation(c75487237.negop)
end c:RegisterEffect(e2)
end end
function c75487237.target(e,tp,eg,ep,ev,re,r,rp,chk) function c75487237.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -30,15 +30,15 @@ function c75487237.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,15 +30,15 @@ function c75487237.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE)
end end
end end
function c75487237.negop(e,tp,eg,ep,ev,re,r,rp) function c75487237.negcon(e,tp,eg,ep,ev,re,r,rp)
if re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then if re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g then return end return tg:GetCount()==1 and tg:GetFirst()==e:GetHandler() and e:GetHandler():IsFacedown()
local tc=g:GetFirst() else
if g:GetCount()==1 and tc:IsCode(75487237) and tc:IsLocation(LOCATION_MZONE) return false
and tc:IsFacedown() and tc:IsDefencePos() then
Duel.ChangePosition(tc,POS_FACEUP_DEFENCE)
Duel.NegateActivation(ev)
end
end end
end end
function c75487237.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENCE)
end
...@@ -243,8 +243,8 @@ EFFECT_FLAG_CARD_TARGET =0x0010 --取对象效果 ...@@ -243,8 +243,8 @@ EFFECT_FLAG_CARD_TARGET =0x0010 --取对象效果
EFFECT_FLAG_IGNORE_RANGE =0x0020 --影响所有区域的卡(禁止令 大宇宙 王宫的铁壁) EFFECT_FLAG_IGNORE_RANGE =0x0020 --影响所有区域的卡(禁止令 大宇宙 王宫的铁壁)
EFFECT_FLAG_ABSOLUTE_TARGET =0x0040 --Target Range不会因为控制权的改变而改变 EFFECT_FLAG_ABSOLUTE_TARGET =0x0040 --Target Range不会因为控制权的改变而改变
EFFECT_FLAG_IGNORE_IMMUNE =0x0080 --无视效果免疫 EFFECT_FLAG_IGNORE_IMMUNE =0x0080 --无视效果免疫
EFFECT_FLAG_SET_AVAILABLE =0x0100 --影响场上里侧的卡 EFFECT_FLAG_SET_AVAILABLE =0x0100 --影响场上里侧的卡/裡側狀態可發動
EFFECT_FLAG_MULTIACT_HAND =0x0200 --手牌有多张可以同时诱发(蔷薇妖精等 EFFECT_FLAG_MULTIACT_HAND =0x0200 --手牌有多张可以同时诱发(
EFFECT_FLAG_CANNOT_DISABLE =0x0400 --不会被无效 EFFECT_FLAG_CANNOT_DISABLE =0x0400 --不会被无效
EFFECT_FLAG_PLAYER_TARGET =0x0800 --以玩家为对象 EFFECT_FLAG_PLAYER_TARGET =0x0800 --以玩家为对象
EFFECT_FLAG_BOTH_SIDE =0x1000 --双方都能使用(部分场地,弹压) EFFECT_FLAG_BOTH_SIDE =0x1000 --双方都能使用(部分场地,弹压)
......
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