Commit 69305236 authored by mercury233's avatar mercury233

fix

parent cd1bd1f0
......@@ -32,7 +32,7 @@ function c28806532.initial_effect(c)
c:RegisterEffect(e3)
end
function c28806532.tfcfilter(c,tp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(0x109) and c:IsPreviousLocation(LOCATION_ONFIELD)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(0x109) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp
end
function c28806532.tfcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c28806532.tfcfilter,1,e:GetHandler(),tp)
......
......@@ -152,10 +152,10 @@ function c35371948.rstop2(e,tp,eg,ep,ev,re,r,rp)
if te then te:Reset() end
end
function c35371948.damcon1(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and eg:GetFirst():IsSetCard(0xfb)
return ep~=tp and Duel.GetLP(1-tp)>0 and eg:GetFirst():IsSetCard(0xfb)
end
function c35371948.damcon2(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and bit.band(r,REASON_BATTLE)==0 and re
return ep~=tp and Duel.GetLP(1-tp)>0 and bit.band(r,REASON_BATTLE)==0 and re
and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0xfb)
end
function c35371948.damop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -35,7 +35,7 @@ function c35498188.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(c35498188.atkcon)
e1:SetOperation(c35498188.atkop)
......@@ -48,7 +48,9 @@ function c35498188.atkcon(e,tp,eg,ep,ev,re,r,rp)
return aux.bdocon(e,tp,eg,ep,ev,re,r,rp) and e:GetHandler():IsChainAttackable()
end
function c35498188.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack()
if Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(35498188,1)) then
Duel.ChainAttack()
end
end
function c35498188.costfilter(c)
return c:IsType(TYPE_SPELL) and c:IsDiscardable()
......
......@@ -77,8 +77,7 @@ function c35606858.dccost(e,tp,eg,ep,ev,re,r,rp,chk)
c:RegisterFlagEffect(35606859,RESET_CHAIN,0,1)
end
function c35606858.cfilter(c,e,tp)
return (c:IsRace(RACE_FIEND) or bit.band(c:GetPreviousRaceOnField(),RACE_FIEND)~=0)
and c:IsType(TYPE_MONSTER) and c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp)
return c:IsRace(RACE_FIEND) and c:IsType(TYPE_MONSTER) and c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp)
and (c:IsAbleToHand() or c:IsAbleToDeck() or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end
function c35606858.dctg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -19,11 +19,10 @@ function c58421530.spfilter(c,e,tp,code)
return c:IsSetCard(0x102) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:GetOriginalCode()~=code
end
function c58421530.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc~=c and c58421530.desfilter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c58421530.desfilter1,tp,LOCATION_ONFIELD,0,1,c,e,tp) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c58421530.desfilter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c58421530.desfilter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c58421530.desfilter1,tp,LOCATION_ONFIELD,0,1,1,c,e,tp)
local g=Duel.SelectTarget(tp,c58421530.desfilter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
......
......@@ -2,12 +2,11 @@
function c65172015.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,1561110,91998119,true,true)
--spsummon condition
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c65172015.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
......@@ -45,9 +44,6 @@ function c65172015.initial_effect(c)
e4:SetOperation(c65172015.spop2)
c:RegisterEffect(e4)
end
function c65172015.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c65172015.matfilter(c)
return (c:GetOriginalCode()==1561110 or c:GetOriginalCode()==91998119) and c:IsAbleToRemoveAsCost()
end
......
......@@ -17,9 +17,9 @@ function c85008676.initial_effect(c)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_HAND)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCondition(aux.damcon1)
e2:SetCondition(c85008676.damcon2)
e2:SetCost(c85008676.damcost)
e2:SetOperation(c85008676.operation)
e2:SetOperation(c85008676.damop2)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
......@@ -45,14 +45,17 @@ function c85008676.damop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e1:SetOperation(c85008676.dop)
e1:SetOperation(c85008676.halfop)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e1,tp)
end
function c85008676.dop(e,tp,eg,ep,ev,re,r,rp)
function c85008676.halfop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(tp,math.ceil(ev/2))
end
function c85008676.operation(e,tp,eg,ep,ev,re,r,rp)
function c85008676.damcon2(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and aux.damcon1(e,tp,eg,ep,ev,re,r,rp)
end
function c85008676.damop2(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -60,11 +63,11 @@ function c85008676.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetLabel(cid)
e1:SetValue(c85008676.damcon2)
e1:SetValue(c85008676.damval2)
e1:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e1,tp)
end
function c85008676.damcon2(e,re,val,r,rp,rc)
function c85008676.damval2(e,re,val,r,rp,rc)
local cc=Duel.GetCurrentChain()
if cc==0 or bit.band(r,REASON_EFFECT)==0 then return end
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
......
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