Commit 2c6d3f74 authored by mercury233's avatar mercury233

fix

parent 5d9dc6aa
......@@ -26,7 +26,7 @@ function c100248028.initial_effect(c)
c:RegisterEffect(e2)
end
function c100248028.cfilter(c,tp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
return c:IsPreviousLocation(LOCATION_MZONE)
and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)
end
function c100248028.spcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -72,7 +72,7 @@ function c100248031.operation1(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
function c100248031.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c100248031.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -85,7 +85,7 @@ function c100248031.operation2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c100248031.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -23,16 +23,12 @@ function c100248039.initial_effect(c)
e2:SetDescription(aux.Stringid(100248039,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c100248039.spcon)
e2:SetTarget(c100248039.sptg)
e2:SetOperation(c100248039.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_BATTLE_DESTROYED)
e3:SetCondition(c100248039.spcon2)
c:RegisterEffect(e3)
end
function c100248039.damcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and bit.band(r,REASON_BATTLE)==0 and re and re:GetHandler()~=e:GetHandler() and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x22c)
......@@ -49,17 +45,15 @@ function c100248039.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function c100248039.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=eg:GetFirst()
return rc:IsRelateToBattle() and rc:IsStatus(STATUS_OPPO_BATTLE)
and rc:IsFaceup() and rc:IsSetCard(0x22c) and rc:IsControler(tp)
end
function c100248039.cfilter(c,tp)
return c:IsSetCard(0x22c) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp
if c:IsSetCard(0x22c) and c:GetPreviousControler()==tp then return true end
local rc=c:GetBattleTarget()
return rc:IsSetCard(0x22c)
and (not rc:IsLocation(LOCATION_MZONE) and rc:GetPreviousControler()==tp
or rc:IsLocation(LOCATION_MZONE) and rc:IsControler(tp))
end
function c100248039.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100248039.cfilter,1,nil,tp)
function c100248039.spcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c100248039.cfilter,1,nil,tp)
end
function c100248039.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -25,8 +25,6 @@ function c100250007.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsPlayerCanDraw(tp,1) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c100250007.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -5,18 +5,12 @@ function c100251001.initial_effect(c)
--win
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_ADJUST)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c100251001.condition)
e1:SetOperation(c100251001.operation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_FLIP)
c:RegisterEffect(e3)
end
function c100251001.winfilter(c)
return c:IsFaceup() and c:IsSetCard(0x40) and c:IsType(TYPE_NORMAL)
......
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