Commit c4f5f892 authored by nekrozar's avatar nekrozar

fix & update trap monster

parent f8076f54
......@@ -8,6 +8,15 @@ function c13955608.initial_effect(c)
e1:SetTarget(c13955608.target)
e1:SetOperation(c13955608.activate)
c:RegisterEffect(e1)
--update attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(3000)
e2:SetCondition(c13955608.atkcon)
c:RegisterEffect(e2)
end
function c13955608.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -20,18 +29,7 @@ function c13955608.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,13955608,0,0x21,0,2000,4,RACE_MACHINE,ATTRIBUTE_EARTH) then return end
c:AddMonsterAttribute(TYPE_TRAP+TYPE_EFFECT)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP_DEFENSE)
--update attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(3000)
e1:SetCondition(c13955608.atkcon)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
Duel.SpecialSummon(c,1,tp,tp,true,false,POS_FACEUP_DEFENSE)
end
function c13955608.cfilter(c,code)
return c:IsFaceup() and c:IsCode(code)
......@@ -41,4 +39,5 @@ function c13955608.atkcon(e)
return Duel.IsExistingMatchingCard(c13955608.cfilter,tp,LOCATION_ONFIELD,0,1,nil,41172955)
and Duel.IsExistingMatchingCard(c13955608.cfilter,tp,LOCATION_ONFIELD,0,1,nil,86445415)
and Duel.IsExistingMatchingCard(c13955608.cfilter,tp,LOCATION_ONFIELD,0,1,nil,13839120)
and e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
......@@ -9,6 +9,16 @@ function c20960340.initial_effect(c)
e1:SetTarget(c20960340.target)
e1:SetOperation(c20960340.activate)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(20960340,0))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_BATTLED)
e2:SetCondition(c20960340.damcon)
e2:SetTarget(c20960340.damtg)
e2:SetOperation(c20960340.damop)
c:RegisterEffect(e2)
end
function c20960340.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
......@@ -27,24 +37,13 @@ function c20960340.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,20960340,0,0x21,atk,0,4,RACE_WARRIOR,ATTRIBUTE_LIGHT) then return end
c:AddMonsterAttribute(TYPE_TRAP+TYPE_EFFECT)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP_ATTACK)
Duel.SpecialSummonStep(c,1,tp,tp,true,false,POS_FACEUP_ATTACK)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(20960340,0))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_BATTLED)
e2:SetCondition(c20960340.damcon)
e2:SetTarget(c20960340.damtg)
e2:SetOperation(c20960340.damop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2,true)
Duel.SpecialSummonComplete()
local at=Duel.GetAttacker()
if at and at:IsAttackable() and at:IsFaceup() and not at:IsImmuneToEffect(e) and not at:IsStatus(STATUS_ATTACK_CANCELED) then
......@@ -53,7 +52,8 @@ function c20960340.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c20960340.damcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
local c=e:GetHandler()
return c:IsStatus(STATUS_BATTLE_DESTROYED) and c:GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c20960340.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -8,6 +8,27 @@ function c23626223.initial_effect(c)
e1:SetTarget(c23626223.target)
e1:SetOperation(c23626223.activate)
c:RegisterEffect(e1)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c23626223.tgcon)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(23626223,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c23626223.descon)
e3:SetTarget(c23626223.destg)
e3:SetOperation(c23626223.desop)
c:RegisterEffect(e3)
end
function c23626223.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -20,42 +41,22 @@ function c23626223.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,23626223,0,0x21,0,2500,7,RACE_ROCK,ATTRIBUTE_EARTH) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
--monster effects
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c23626223.tgcon)
e1:SetValue(aux.tgoval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(23626223,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c23626223.descon)
e2:SetTarget(c23626223.destg)
e2:SetOperation(c23626223.desop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2,true)
Duel.SpecialSummonComplete()
Duel.SpecialSummon(c,1,tp,tp,true,false,POS_FACEUP)
end
function c23626223.tgfilter(c)
return c:IsFaceup() and bit.band(c:GetOriginalType(),TYPE_TRAP)~=0 and c:IsType(TYPE_MONSTER)
end
function c23626223.tgcon(e)
return Duel.IsExistingMatchingCard(c23626223.tgfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler())
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c23626223.tgfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,c)
and c:GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c23626223.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousControler()==tp
end
function c23626223.descon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c23626223.cfilter,1,nil,tp)
local c=e:GetHandler()
return c:GetSummonType()==SUMMON_TYPE_SPECIAL+1 and not eg:IsContains(c) and eg:IsExists(c23626223.cfilter,1,nil,tp)
end
function c23626223.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
......
......@@ -9,9 +9,15 @@ function c26905245.initial_effect(c)
e1:SetTarget(c26905245.target)
e1:SetOperation(c26905245.activate)
c:RegisterEffect(e1)
--cannot attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_ATTACK)
e2:SetCondition(c26905245.atkcon)
c:RegisterEffect(e2)
end
function c26905245.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,26905245,0,0x21,0,3000,10,RACE_AQUA,ATTRIBUTE_WATER) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
......@@ -21,12 +27,8 @@ function c26905245.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,26905245,0,0x21,0,3000,10,RACE_AQUA,ATTRIBUTE_WATER) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP_DEFENSE)
--cannot attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
Duel.SpecialSummon(c,1,tp,tp,true,false,POS_FACEUP_DEFENSE)
end
function c26905245.atkcon(e)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
......@@ -9,6 +9,19 @@ function c27062594.initial_effect(c)
e1:SetTarget(c27062594.target)
e1:SetOperation(c27062594.activate)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(27062594,0))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCondition(c27062594.damcon)
e2:SetCost(c27062594.damcost)
e2:SetTarget(c27062594.damtg)
e2:SetOperation(c27062594.damop)
c:RegisterEffect(e2)
end
function c27062594.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
......@@ -26,24 +39,10 @@ function c27062594.activate(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e)
or not Duel.IsPlayerCanSpecialSummonMonster(tp,27062594,0,0x21,0,0,1,RACE_FIEND,ATTRIBUTE_LIGHT) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(27062594,0))
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCondition(c27062594.damcon)
e1:SetCost(c27062594.damcost)
e1:SetTarget(c27062594.damtg)
e1:SetOperation(c27062594.damop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
Duel.SpecialSummon(c,1,tp,tp,true,false,POS_FACEUP)
end
function c27062594.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 and Duel.GetTurnPlayer()==tp
end
function c27062594.cfilter(c)
return c:IsSetCard(0x107f) and c:IsAbleToRemoveAsCost()
......
......@@ -9,9 +9,20 @@ function c3129635.initial_effect(c)
e1:SetTarget(c3129635.target)
e1:SetOperation(c3129635.activate)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(3129635,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_BATTLED)
e2:SetCondition(c3129635.descon)
e2:SetTarget(c3129635.destg)
e2:SetOperation(c3129635.desop)
c:RegisterEffect(e2)
end
function c3129635.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,3129635,0,0x21,1800,1000,4,RACE_ROCK,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
......@@ -21,18 +32,10 @@ function c3129635.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,3129635,0,0x21,1800,1000,4,RACE_ROCK,ATTRIBUTE_DARK) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(3129635,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_BATTLED)
e1:SetTarget(c3129635.destg)
e1:SetOperation(c3129635.desop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
Duel.SpecialSummon(c,1,tp,tp,true,false,POS_FACEUP)
end
function c3129635.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c3129635.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local a=Duel.GetAttacker()
......
......@@ -9,12 +9,22 @@ function c42237854.initial_effect(c)
e1:SetTarget(c42237854.target)
e1:SetOperation(c42237854.activate)
c:RegisterEffect(e1)
--atk
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_UPDATE_ATTACK)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetRange(LOCATION_MZONE)
e0:SetCondition(c42237854.condition)
e0:SetValue(c42237854.atkval)
c:RegisterEffect(e0)
--atk limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCondition(c42237854.condition)
e2:SetValue(c42237854.atlimit)
c:RegisterEffect(e2)
--cannot be target
......@@ -24,6 +34,7 @@ function c42237854.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetCondition(c42237854.condition)
e3:SetTarget(c42237854.tgtg)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
......@@ -52,17 +63,7 @@ function c42237854.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,42237854,0,0x21,0,0,4,RACE_MACHINE,ATTRIBUTE_EARTH) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c42237854.atkval)
c:RegisterEffect(e1)
Duel.SpecialSummonComplete()
Duel.SpecialSummon(c,1,tp,tp,true,false,POS_FACEUP)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c42237854.tgfilter,nil,e)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if g:GetCount()<=0 or ft<=0 then return end
......@@ -91,6 +92,9 @@ function c42237854.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.EquipComplete()
end
end
function c42237854.condition(e)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c42237854.atkval(e,c)
local atk=0
local g=c:GetEquipGroup()
......
......@@ -9,6 +9,25 @@ function c43959432.initial_effect(c)
e1:SetTarget(c43959432.target)
e1:SetOperation(c43959432.activate)
c:RegisterEffect(e1)
--position
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_DAMAGE_STEP_END)
e2:SetCondition(c43959432.poscon)
e2:SetOperation(c43959432.posop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c43959432.atkcon)
e3:SetValue(c43959432.atkval)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
end
function c43959432.filter(c)
return c:IsFaceup() and c:IsLevelAbove(4)
......@@ -30,29 +49,7 @@ function c43959432.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,43959432,0,0x21,1000,1000,4,RACE_ROCK,ATTRIBUTE_EARTH) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
--position
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_DAMAGE_STEP_END)
e1:SetCondition(c43959432.poscon)
e1:SetOperation(c43959432.posop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c43959432.atkval)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2,true)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3,true)
Duel.SpecialSummonComplete()
Duel.SpecialSummon(c,1,tp,tp,true,false,POS_FACEUP)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.BreakEffect()
......@@ -69,7 +66,8 @@ function c43959432.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c43959432.poscon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler()==Duel.GetAttacker() and e:GetHandler():IsRelateToBattle()
local c=e:GetHandler()
return c:GetSummonType()==SUMMON_TYPE_SPECIAL+1 and c==Duel.GetAttacker() and c:IsRelateToBattle()
end
function c43959432.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -77,6 +75,9 @@ function c43959432.posop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangePosition(c,POS_FACEUP_DEFENSE)
end
end
function c43959432.atkcon(e)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c43959432.atkval(e,c)
local tc=e:GetLabelObject()
if not tc or tc:GetEquipTarget()~=c then return 0 end
......
......@@ -9,6 +9,14 @@ function c4904633.initial_effect(c)
e1:SetTarget(c4904633.target)
e1:SetOperation(c4904633.activate)
c:RegisterEffect(e1)
--attribute substitute
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetCode(4904633)
e0:SetRange(LOCATION_MZONE)
e0:SetCondition(c4904633.condition)
c:RegisterEffect(e0)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4904633,0))
......@@ -32,13 +40,10 @@ function c4904633.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,4904633,0,0x21,1450,1950,9,RACE_SPELLCASTER,ATTRIBUTE_DARK) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(4904633)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
Duel.SpecialSummon(c,1,tp,tp,true,false,POS_FACEUP)
end
function c4904633.condition(e)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c4904633.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
......
......@@ -9,12 +9,21 @@ function c49514333.initial_effect(c)
e1:SetTarget(c49514333.target)
e1:SetOperation(c49514333.activate)
c:RegisterEffect(e1)
--send replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_SEND_REPLACE)
e2:SetCondition(c49514333.repcon)
e2:SetTarget(c49514333.reptg)
e2:SetValue(c49514333.repval)
c:RegisterEffect(e2)
local g=Group.CreateGroup()
g:KeepAlive()
e1:SetLabelObject(g)
e2:SetLabelObject(g)
end
function c49514333.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,49514333,0,0x21,1000,1800,4,RACE_ROCK,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
......@@ -24,17 +33,10 @@ function c49514333.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,49514333,0,0x21,1000,1800,4,RACE_ROCK,ATTRIBUTE_LIGHT) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SEND_REPLACE)
e1:SetTarget(c49514333.reptg)
e1:SetValue(c49514333.repval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(e)
c:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
Duel.SpecialSummon(c,1,tp,tp,true,false,POS_FACEUP)
end
function c49514333.repcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c49514333.repfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:GetDestination()==LOCATION_GRAVE and c:GetLeaveFieldDest()==0 and c:IsReason(REASON_DESTROY)
......@@ -46,7 +48,7 @@ function c49514333.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
return count>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>=count
end
if Duel.SelectYesNo(tp,aux.Stringid(49514333,0)) then
local container=e:GetLabelObject():GetLabelObject()
local container=e:GetLabelObject()
container:Clear()
local g=eg:Filter(c49514333.repfilter,e:GetHandler(),tp)
local tc=g:GetFirst()
......@@ -61,5 +63,5 @@ function c49514333.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
return false
end
function c49514333.repval(e,c)
return e:GetLabelObject():GetLabelObject():IsContains(c)
return e:GetLabelObject():IsContains(c)
end
......@@ -10,6 +10,16 @@ function c54297661.initial_effect(c)
e1:SetTarget(c54297661.target)
e1:SetOperation(c54297661.activate)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(54297661,0))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c54297661.damcon)
e2:SetTarget(c54297661.damtg)
e2:SetOperation(c54297661.damop)
c:RegisterEffect(e2)
end
function c54297661.mzfilter(c,tp)
return c:GetSequence()<5
......@@ -56,7 +66,7 @@ function c54297661.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,54297661,0,0x21,atk,def,4,RACE_SPELLCASTER,ATTRIBUTE_DARK) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
if Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) then
if Duel.SpecialSummonStep(c,1,tp,tp,true,false,POS_FACEUP_ATTACK) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
......@@ -67,19 +77,12 @@ function c54297661.activate(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_SET_DEFENSE)
e2:SetValue(def)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(54297661,0))
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetTarget(c54297661.damtg)
e3:SetOperation(c54297661.damop)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3,true)
end
Duel.SpecialSummonComplete()
end
function c54297661.damcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c54297661.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local dam=e:GetHandler():GetAttack()
......
......@@ -9,9 +9,20 @@ function c55838342.initial_effect(c)
e1:SetTarget(c55838342.target)
e1:SetOperation(c55838342.activate)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(55838342,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c55838342.thcon)
e2:SetTarget(c55838342.thtg)
e2:SetOperation(c55838342.thop)
c:RegisterEffect(e2)
end
function c55838342.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,55838342,0,0x21,300,2100,2,RACE_INSECT,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
......@@ -21,20 +32,7 @@ function c55838342.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,55838342,0,0x21,300,2100,2,RACE_INSECT,ATTRIBUTE_EARTH) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
Duel.SpecialSummonStep(c,1,tp,tp,true,false,POS_FACEUP)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(55838342,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c55838342.thcon)
e1:SetTarget(c55838342.thtg)
e1:SetOperation(c55838342.thop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
Duel.SpecialSummon(c,1,tp,tp,true,false,POS_FACEUP)
end
function c55838342.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -10,6 +10,17 @@ function c70406920.initial_effect(c)
e1:SetTarget(c70406920.target)
e1:SetOperation(c70406920.activate)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(70406920,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c70406920.atkcon)
e2:SetCost(c70406920.atkcost)
e2:SetOperation(c70406920.atkop)
c:RegisterEffect(e2)
end
function c70406920.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
......@@ -34,7 +45,7 @@ function c70406920.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return e:GetLabelObject()~=se
end
function c70406920.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,70406920,0,0x21,1000,1000,4,RACE_MACHINE,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
......@@ -44,19 +55,10 @@ function c70406920.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,70406920,0,0x21,1000,1000,4,RACE_MACHINE,ATTRIBUTE_EARTH) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(70406920,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(c70406920.atkcost)
e1:SetOperation(c70406920.atkop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
Duel.SpecialSummon(c,1,tp,tp,true,false,POS_FACEUP)
end
function c70406920.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c70406920.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,e:GetHandler(),RACE_MACHINE) end
......
......@@ -9,9 +9,19 @@ function c79852326.initial_effect(c)
e1:SetTarget(c79852326.target)
e1:SetOperation(c79852326.activate)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(79852326,0))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCondition(c79852326.damcon)
e2:SetTarget(c79852326.damtg)
e2:SetOperation(c79852326.damop)
c:RegisterEffect(e2)
end
function c79852326.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,79852326,0,0x21,1800,500,4,RACE_ZOMBIE,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
......@@ -21,22 +31,11 @@ function c79852326.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,79852326,0,0x21,1800,500,4,RACE_ZOMBIE,ATTRIBUTE_DARK) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP_DEFENSE)
--damage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(79852326,0))
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetCondition(c79852326.damcon)
e1:SetTarget(c79852326.damtg)
e1:SetOperation(c79852326.damop)
e1:SetReset(RESET_EVENT+RESET_OVERLAY+RESET_TOFIELD)
c:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
Duel.SpecialSummon(c,1,tp,tp,true,false,POS_FACEUP_DEFENSE)
end
function c79852326.damcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_BATTLE)
local c=e:GetHandler()
return c:GetSummonType()==SUMMON_TYPE_SPECIAL+1 and c:IsReason(REASON_BATTLE)
end
function c79852326.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......@@ -50,5 +49,4 @@ end
function c79852326.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)
e:Reset()
end
......@@ -8,6 +8,27 @@ function c86885905.initial_effect(c)
e1:SetTarget(c86885905.target)
e1:SetOperation(c86885905.activate)
c:RegisterEffect(e1)
--untargetable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(LOCATION_ONFIELD,0)
e2:SetCondition(c86885905.condition)
e2:SetTarget(c86885905.etarget)
e2:SetValue(1)
c:RegisterEffect(e2)
--indestructable
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetCondition(c86885905.condition)
e3:SetTarget(c86885905.etarget)
e3:SetValue(1)
c:RegisterEffect(e3)
end
function c86885905.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -20,28 +41,10 @@ function c86885905.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,86885905,0x103,0x21,1400,1800,4,RACE_SPELLCASTER,ATTRIBUTE_LIGHT) then return end
c:AddMonsterAttribute(TYPE_TRAP+TYPE_EFFECT)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
--untargetable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetTarget(c86885905.etarget)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_ONFIELD,0)
e2:SetTarget(c86885905.etarget)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2,true)
Duel.SpecialSummonComplete()
Duel.SpecialSummon(c,1,tp,tp,true,false,POS_FACEUP)
end
function c86885905.condition(e)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c86885905.etarget(e,c)
return c:IsSetCard(0x103) and c:IsType(TYPE_TRAP) and c~=e:GetHandler()
......
......@@ -10,13 +10,32 @@ function c90440725.initial_effect(c)
e1:SetTarget(c90440725.target)
e1:SetOperation(c90440725.activate)
c:RegisterEffect(e1)
--attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c90440725.atkcon)
e2:SetOperation(c90440725.atkop)
c:RegisterEffect(e2)
--turn set
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(90440725,0))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c90440725.setcon)
e3:SetTarget(c90440725.settg)
e3:SetOperation(c90440725.setop)
c:RegisterEffect(e3)
end
function c90440725.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()==1-tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function c90440725.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,90440725,0,0x21,-2,-2,4,RACE_MACHINE,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
......@@ -26,32 +45,11 @@ function c90440725.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,90440725,0,0x21,-2,-2,4,RACE_MACHINE,ATTRIBUTE_EARTH) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
--cannot attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c90440725.atkcon)
e1:SetOperation(c90440725.atkop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
--turn set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(90440725,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c90440725.setcon)
e2:SetTarget(c90440725.settg)
e2:SetOperation(c90440725.setop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2,true)
Duel.SpecialSummonComplete()
Duel.SpecialSummon(c,1,tp,tp,true,false,POS_FACEUP)
end
function c90440725.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==e:GetHandler()
local c=e:GetHandler()
return c:GetSummonType()==SUMMON_TYPE_SPECIAL+1 and Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==c
end
function c90440725.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -69,10 +67,10 @@ function c90440725.atkop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1)
end
function c90440725.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 and Duel.GetTurnPlayer()==1-tp
end
function c90440725.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanTurnSet() end
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0)
end
function c90440725.setop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -8,6 +8,15 @@ function c97232518.initial_effect(c)
e1:SetTarget(c97232518.target)
e1:SetOperation(c97232518.activate)
c:RegisterEffect(e1)
--indestructable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(1)
e2:SetCondition(c97232518.indcon)
c:RegisterEffect(e2)
end
function c97232518.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -20,14 +29,8 @@ function c97232518.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,97232518,0,0x21,1900,0,5,RACE_THUNDER,ATTRIBUTE_LIGHT) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
Duel.SpecialSummon(c,1,tp,tp,true,false,POS_FACEUP)
end
function c97232518.indcon(e)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
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