Commit 298160d5 authored by VanillaSalt's avatar VanillaSalt

fix

parent 44ac56b2
...@@ -96,7 +96,7 @@ int32 effect::is_available() { ...@@ -96,7 +96,7 @@ int32 effect::is_available() {
return FALSE; return FALSE;
if(handler->is_status(STATUS_BATTLE_DESTROYED) && !(flag & EFFECT_FLAG_AVAILABLE_BD)) if(handler->is_status(STATUS_BATTLE_DESTROYED) && !(flag & EFFECT_FLAG_AVAILABLE_BD))
return FALSE; return FALSE;
if(!(handler->get_status(STATUS_EFFECT_ENABLED))) if(!handler->get_status(STATUS_EFFECT_ENABLED) && !(flag & EFFECT_FLAG_IMMEDIATELY_APPLY))
return FALSE; return FALSE;
if(!in_range(handler->current.location, handler->current.sequence)) if(!in_range(handler->current.location, handler->current.sequence))
return FALSE; return FALSE;
......
...@@ -171,6 +171,7 @@ public: ...@@ -171,6 +171,7 @@ public:
#define EFFECT_FLAG_NAGA 0x10000000 // #define EFFECT_FLAG_NAGA 0x10000000 //
#define EFFECT_FLAG_COF 0x20000000 // #define EFFECT_FLAG_COF 0x20000000 //
#define EFFECT_FLAG_CVAL_CHECK 0x40000000 // #define EFFECT_FLAG_CVAL_CHECK 0x40000000 //
#define EFFECT_FLAG_IMMEDIATELY_APPLY 0x80000000 //
//========== Codes ========== //========== Codes ==========
#define EFFECT_IMMUNE_EFFECT 1 // #define EFFECT_IMMUNE_EFFECT 1 //
#define EFFECT_DISABLE 2 // #define EFFECT_DISABLE 2 //
......
...@@ -18,18 +18,13 @@ function c43175858.initial_effect(c) ...@@ -18,18 +18,13 @@ function c43175858.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--cannot be target --cannot be target
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(43175858) e3:SetCode(EFFECT_CANNOT_SELECT_EFFECT_TARGET)
e3:SetProperty(EFFECT_FLAG_IMMEDIATELY_APPLY)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(0,0xff)
e3:SetValue(c43175858.etarget)
c:RegisterEffect(e3) c:RegisterEffect(e3)
if not c43175858.global_check then
c43175858.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD)
ge1:SetCode(EFFECT_CANNOT_SELECT_EFFECT_TARGET)
ge1:SetProperty(EFFECT_FLAG_IGNORE_RANGE)
ge1:SetValue(c43175858.etarget)
Duel.RegisterEffect(ge1,0)
end
--destroy replace --destroy replace
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
...@@ -54,10 +49,7 @@ function c43175858.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,10 +49,7 @@ function c43175858.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end end
function c43175858.etarget(e,re,c) function c43175858.etarget(e,re,c)
local rp=re:GetHandlerPlayer() return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsType(TYPE_TOON)
local fc=Duel.GetFieldCard(1-rp,LOCATION_SZONE,5)
return fc and fc:IsFaceup() and fc:IsHasEffect(43175858)
and c:IsFaceup() and c:IsControler(1-rp) and c:IsLocation(LOCATION_MZONE) and c:IsType(TYPE_TOON)
end end
function c43175858.repfilter(c,tp) function c43175858.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
...@@ -68,9 +60,8 @@ function c43175858.reptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -68,9 +60,8 @@ function c43175858.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(tp,ct) local g=Duel.GetDecktopGroup(tp,ct)
if chk==0 then return g:IsExists(Card.IsAbleToRemove,ct,nil) end if chk==0 then return g:IsExists(Card.IsAbleToRemove,ct,nil) end
if Duel.SelectYesNo(tp,aux.Stringid(43175858,0)) then if Duel.SelectYesNo(tp,aux.Stringid(43175858,0)) then
local dg=Duel.GetDecktopGroup(tp,ct)
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.Remove(dg,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
return true return true
else return false end else return false end
end end
......
...@@ -266,6 +266,7 @@ EFFECT_FLAG_CHAIN_UNIQUE =0x8000000 --同一组连锁只能发动一次 ...@@ -266,6 +266,7 @@ EFFECT_FLAG_CHAIN_UNIQUE =0x8000000 --同一组连锁只能发动一次
EFFECT_FLAG_NAGA =0x10000000 --神卡纳迦! EFFECT_FLAG_NAGA =0x10000000 --神卡纳迦!
EFFECT_FLAG_COF =0x20000000 --邪恶的仪式 EFFECT_FLAG_COF =0x20000000 --邪恶的仪式
EFFECT_FLAG_CVAL_CHECK =0x40000000 --以卡为COST的诱发效果需要使用 EFFECT_FLAG_CVAL_CHECK =0x40000000 --以卡为COST的诱发效果需要使用
EFFECT_FLAG_IMMEDIATELY_APPLY =0x80000000 --
--========== Codes ========== --对永续性效果表示效果类型 EFFECT开头,对诱发型效果表示触发效果的事件/时点 EVENT开头 --========== Codes ========== --对永续性效果表示效果类型 EFFECT开头,对诱发型效果表示触发效果的事件/时点 EVENT开头
EFFECT_IMMUNE_EFFECT =1 --效果免疫 EFFECT_IMMUNE_EFFECT =1 --效果免疫
EFFECT_DISABLE =2 --效果无效(技能抽取) EFFECT_DISABLE =2 --效果无效(技能抽取)
......
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