Commit b6cd0b77 authored by VanillaSalt's avatar VanillaSalt

fix

parent c1194f8b
......@@ -16,6 +16,7 @@ function c1003840.initial_effect(c)
e2:SetTarget(c1003840.sptg)
e2:SetOperation(c1003840.spop)
c:RegisterEffect(e2)
--todeck
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
......
......@@ -30,7 +30,8 @@ function c61156777.initial_effect(c)
end
function c61156777.ctcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsType(TYPE_MONSTER) and bc:IsLocation(LOCATION_GRAVE)
end
function c61156777.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -72,7 +72,7 @@ function c74892653.sccon(e,tp,eg,ep,ev,re,r,rp)
and c:IsPreviousPosition(POS_FACEUP)
end
function c74892653.filter(c,e,tp)
return c:IsSetCard(0xc1) and c:IsLevelBelow(8) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,true,false)
return c:IsSetCard(0xc1) and c:IsLevelBelow(8) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
end
function c74892653.sctg(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 c74892653.scop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c74892653.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,true,false,POS_FACEUP)
Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure()
end
end
......@@ -5,24 +5,28 @@ function c8529136.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c8529136.condition)
e1:SetTarget(c8529136.target)
e1:SetOperation(c8529136.activate)
c:RegisterEffect(e1)
end
function c8529136.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()<PHASE_MAIN2
end
function c8529136.filter(c)
return c:IsFaceup() and c:IsCode(60800381) and c:GetFlagEffect(8529136)==0
end
function c8529136.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c8529136.filter(chkc) end
if chk==0 then return bit.band(Duel.GetCurrentPhase(),0xc0)==0
and Duel.IsExistingTarget(c8529136.filter,tp,LOCATION_MZONE,0,1,nil) end
if chk==0 then return Duel.IsExistingTarget(c8529136.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c8529136.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c8529136.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:GetFlagEffect(8529136)==0 then
if tc:IsRelateToEffect(e) then
if tc:GetFlagEffect(8529136)==0 then
tc:RegisterFlagEffect(8529136,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END,0,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -37,7 +41,7 @@ function c8529136.activate(e,tp,eg,ep,ev,re,r,rp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
e2:SetCondition(c8529136.con)
e2:SetCondition(c8529136.effcon)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
......@@ -50,48 +54,43 @@ function c8529136.activate(e,tp,eg,ep,ev,re,r,rp)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetCondition(c8529136.con)
e4:SetCondition(c8529136.effcon)
e4:SetValue(1)
e4:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e4)
end
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_DAMAGE_STEP_END)
e5:SetCondition(c8529136.descon)
e5:SetTarget(c8529136.destg)
e5:SetOperation(c8529136.desop)
e5:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e5)
end
end
function c8529136.actcon(e)
return e:GetHandler():GetBattleTarget()~=nil and e:GetHandler():GetControler()==e:GetOwnerPlayer()
local c=e:GetHandler()
return (Duel.GetAttacker()==c or Duel.GetAttackTarget()==c) and c:GetBattleTarget()~=nil
and e:GetOwnerPlayer()==e:GetHandlerPlayer()
end
function c8529136.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c8529136.con(e)
return e:GetHandler():GetControler()==e:GetOwnerPlayer()
function c8529136.effcon(e)
return e:GetOwnerPlayer()==e:GetHandlerPlayer()
end
function c8529136.damcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and e:GetHandler():GetBattleTarget()~=nil and e:GetHandler():GetControler()==e:GetOwnerPlayer()
return ep~=tp and e:GetHandler():GetBattleTarget()~=nil and e:GetOwnerPlayer()==tp
end
function c8529136.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*2)
end
function c8529136.descon(e,tp,eg,ep,ev,re,r,rp)
local d=e:GetHandler():GetBattleTarget()
return d and d:IsRelateToBattle() and e:GetHandler():GetControler()==e:GetOwnerPlayer()
end
function c8529136.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetBattleTarget()
if chk==0 then return tc:IsDestructable() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
return tc and tc:IsRelateToBattle() and e:GetOwnerPlayer()==tp
end
function c8529136.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
if tc:IsRelateToBattle() then
Duel.Hint(HINT_CARD,0,8529136)
Duel.Destroy(tc,REASON_EFFECT)
end
end
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