Commit 26e0bfa5 authored by argon.sun's avatar argon.sun

new scripts

parent 1fb6dd0f
...@@ -1679,7 +1679,7 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) { ...@@ -1679,7 +1679,7 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
return FALSE; return FALSE;
} }
case 7: { case 7: {
if(!(core.duel_options & DUEL_ENABLE_PRIORITY)) if(!(core.duel_options & DUEL_ENABLE_PRIORITY) || (infos.phase != PHASE_MAIN1 && infos.phase != PHASE_MAIN2))
return FALSE; return FALSE;
// Due to the new official rules, the priority of ignition effects when summon, special summon, flip summon is canceled // Due to the new official rules, the priority of ignition effects when summon, special summon, flip summon is canceled
// Use DUEL_ENABLE_PRIORITY to enable this feature (TCG) // Use DUEL_ENABLE_PRIORITY to enable this feature (TCG)
......
--武闘円舞
function c15629801.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c15629801.target)
e1:SetOperation(c15629801.activate)
c:RegisterEffect(e1)
end
function c15629801.filter(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO)
and Duel.IsPlayerCanSpecialSummonMonster(tp,15629802,0,0x4011,c:GetAttack(),c:GetDefence(),c:GetLevel(),c:GetRace(),c:GetAttribute())
end
function c15629801.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c15629801.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c15629801.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
local g=Duel.SelectTarget(tp,c15629801.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c15629801.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,15629802,0,0x4011,tc:GetAttack(),tc:GetDefence(),tc:GetLevel(),tc:GetRace(),tc:GetAttribute()) then return end
local token=Duel.CreateToken(tp,15629802)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(tc:GetAttack())
e1:SetReset(RESET_EVENT+0x1fe0000)
token:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENCE)
e2:SetValue(tc:GetDefence())
token:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CHANGE_LEVEL)
e3:SetValue(tc:GetLevel())
token:RegisterEffect(e3)
local e4=e1:Clone()
e4:SetCode(EFFECT_CHANGE_RACE)
e4:SetValue(tc:GetRace())
token:RegisterEffect(e4)
local e5=e1:Clone()
e5:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e5:SetValue(tc:GetAttribute())
token:RegisterEffect(e5)
local e6=Effect.CreateEffect(e:GetHandler())
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_NO_BATTLE_DAMAGE)
e6:SetValue(1)
e6:SetReset(RESET_EVENT+0x1fe0000)
token:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
token:RegisterEffect(e7)
Duel.SpecialSummonComplete()
end
--聖騎士ジャンヌ
function c18426196.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetCondition(c18426196.condtion)
e1:SetValue(-300)
c:RegisterEffect(e1)
--salvage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(18426196,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c18426196.thcon)
e1:SetCost(c18426196.thcost)
e1:SetTarget(c18426196.thtg)
e1:SetOperation(c18426196.thop)
c:RegisterEffect(e1)
end
function c18426196.condtion(e)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL)
and Duel.GetAttacker()==e:GetHandler()
end
function c18426196.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()==1-tp
end
function c18426196.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c18426196.filter(c)
return c:IsLevelBelow(4) and c:IsRace(RACE_WARRIOR) and c:IsAbleToHand()
end
function c18426196.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c18426196.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c18426196.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c18426196.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c18426196.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--反魔鏡
function c20138923.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c20138923.condition)
e1:SetTarget(c20138923.target)
e1:SetOperation(c20138923.activate)
c:RegisterEffect(e1)
end
function c20138923.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and re:IsActiveType(TYPE_QUICKPLAY)
end
function c20138923.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsDestructable() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c20138923.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--連鎖旋風
function c22205600.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c22205600.condition)
e1:SetTarget(c22205600.target)
e1:SetOperation(c22205600.activate)
c:RegisterEffect(e1)
end
function c22205600.cfilter(c)
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c22205600.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c22205600.cfilter,1,nil)
end
function c22205600.filter(c)
return c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c22205600.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c22205600.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22205600.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c22205600.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,2,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
end
function c22205600.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.Destroy(g,REASON_EFFECT)
end
--デーモンの宣告
function c22796548.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--announce
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22796548,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCost(c22796548.cost)
e2:SetTarget(c22796548.target)
e2:SetOperation(c22796548.operation)
c:RegisterEffect(e2)
end
function c22796548.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
function c22796548.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
Duel.Hint(HINT_SELECTMSG,tp,0)
local ac=Duel.AnnounceCard(tp)
e:SetLabel(ac)
end
function c22796548.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:GetCode()==e:GetLabel() and tc:IsAbleToHand() then
Duel.DisableShuffleCheck()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ShuffleHand(tp)
else
Duel.DisableShuffleCheck()
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
--パラレル·セレクト
function c23327298.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c23327298.condition)
e1:SetTarget(c23327298.target)
e1:SetOperation(c23327298.operation)
c:RegisterEffect(e1)
end
function c23327298.cfilter(c,tp)
return c:IsType(TYPE_SYNCHRO) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP)
and c:IsControler(tp) and c:GetPreviousControler()==tp and c:GetReasonPlayer()~=tp
end
function c23327298.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c23327298.cfilter,1,nil,tp)
end
function c23327298.filter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c23327298.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c23327298.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c23327298.filter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c23327298.filter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c23327298.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--幻影の魔術士
function c24103628.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24103628,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCondition(c24103628.condition)
e1:SetTarget(c24103628.target)
e1:SetOperation(c24103628.operation)
c:RegisterEffect(e1)
end
function c24103628.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
end
function c24103628.filter(c,e,tp)
return c:IsAttackBelow(1000) and c:IsSetCard(0x8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c24103628.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c24103628.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c24103628.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c24103628.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
end
end
--ジャスティス·ブリンガー
function c26842483.initial_effect(c)
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(26842483,0))
e1:SetCategory(CATEGORY_NEGATE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c26842483.condition)
e1:SetTarget(c26842483.target)
e1:SetOperation(c26842483.operation)
c:RegisterEffect(e1)
end
function c26842483.condition(e,tp,eg,ep,ev,re,r,rp,chk)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return ep~=tp and loc==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
and bit.band(re:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)~=0
end
function c26842483.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c26842483.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
--死力のタッグ·チェンジ
function c34149830.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--no damage & spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(34149830,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c34149830.condition)
e2:SetCost(c34149830.target)
e2:SetOperation(c34149830.operation)
c:RegisterEffect(e2)
end
function c34149830.condition(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
local bc=tc:GetBattleTarget()
if tc:IsControler(1-tp) then
tc=Duel.GetAttackTarget()
bc=Duel.GetAttacker()
end
return tc and not tc:IsHasEffect(EFFECT_INDESTRUCTABLE_BATTLE)
and ((tc:IsDefence() and tc:GetDefence()<bc:GetAttack()) or (tc:IsAttack() and tc:GetAttack()<=bc:GetAttack()))
end
function c34149830.spfilter(c,e,tp)
return c:GetLevel()==4 and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c34149830.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING)
and Duel.IsExistingMatchingCard(c34149830.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
end
function c34149830.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL)
e1:SetTargetRange(1,0)
e1:SetValue(1)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_DAMAGE_STEP_END)
e2:SetReset(RESET_PHASE+PHASE_DAMAGE)
e2:SetOperation(c34149830.spop)
Duel.RegisterEffect(e2,tp)
end
function c34149830.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c34149830.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()~=0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--賢者の聖杯
function c35262428.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c35262428.condition)
e1:SetTarget(c35262428.target)
e1:SetOperation(c35262428.activate)
c:RegisterEffect(e1)
end
function c35262428.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c35262428.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c35262428.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c96765646.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c35262428.filter,tp,0,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c35262428.filter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c35262428.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UNRELEASEABLE_SUM)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(1)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UNRELEASEABLE_NONSUM)
e2:SetReset(RESET_EVENT+0x1fe0000)
e2:SetValue(1)
tc:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e3:SetReset(RESET_EVENT+0x1fe0000)
e3:SetValue(1)
tc:RegisterEffect(e3,true)
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetOperation(c35262428.ctlop)
e4:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e4:SetCountLimit(1)
tc:RegisterEffect(e4,true)
end
end
function c35262428.ctlop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler()
if not Duel.GetControl(tc,1-tp) and not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--黙する死者
function c42534368.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c42534368.target)
e1:SetOperation(c42534368.activate)
c:RegisterEffect(e1)
end
function c42534368.filter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c42534368.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c42534368.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)~=0
and Duel.IsExistingTarget(c42534368.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c42534368.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c42534368.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1,true)
end
end
--死角からの一撃
function c49267971.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c49267971.condition)
e1:SetTarget(c49267971.target)
e1:SetOperation(c49267971.activate)
c:RegisterEffect(e1)
end
function c49267971.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c49267971.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil)
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g1=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g2=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
e:SetLabelObject(g1:GetFirst())
end
function c49267971.activate(e,tp,eg,ep,ev,re,r,rp)
local tc1=e:GetLabelObject()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc2=g:GetFirst()
if tc1==tc2 then tc2=g:GetNext() end
if tc1:IsRelateToEffect(e) and tc1:IsFaceup() and tc2:IsRelateToEffect(e) and tc2:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
e1:SetValue(tc1:GetDefence())
tc2:RegisterEffect(e1)
end
end
--シンクロ·ギフト
function c52128900.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c52128900.target)
e1:SetOperation(c52128900.activate)
c:RegisterEffect(e1)
end
function c52128900.filter1(c)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO)
end
function c52128900.filter2(c)
return c:IsFaceup() and not c:IsType(TYPE_SYNCHRO)
end
function c52128900.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c52128900.filter1,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(c52128900.filter2,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(52128900,0))
local g1=Duel.SelectTarget(tp,c52128900.filter1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(52128900,1))
local g2=Duel.SelectTarget(tp,c52128900.filter2,tp,LOCATION_MZONE,0,1,1,nil)
e:SetLabelObject(g1:GetFirst())
end
function c52128900.activate(e,tp,eg,ep,ev,re,r,rp)
local tc1=e:GetLabelObject()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc2=g:GetFirst()
if tc1==tc2 then tc2=g:GetNext() end
if tc1:IsRelateToEffect(e) and tc1:IsFaceup() and tc2:IsRelateToEffect(e) and tc2:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
e1:SetValue(tc1:GetBaseAttack())
tc2:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_ATTACK_FINAL)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
e2:SetValue(0)
tc1:RegisterEffect(e2)
end
end
...@@ -35,7 +35,7 @@ function c56948373.initial_effect(c) ...@@ -35,7 +35,7 @@ function c56948373.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c56948373.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c56948373.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:IsFaceup() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
...@@ -58,6 +58,7 @@ function c56948373.damtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -58,6 +58,7 @@ function c56948373.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,Duel.GetTurnPlayer(),500) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,Duel.GetTurnPlayer(),500)
end end
function c56948373.damop(e,tp,eg,ep,ev,re,r,rp) function c56948373.damop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT) Duel.Damage(p,d,REASON_EFFECT)
end end
--パラドックス·フュージョン
function c57355219.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SPSUMMON)
e1:SetCondition(c57355219.condition1)
e1:SetCost(c57355219.cost)
e1:SetTarget(c57355219.target1)
e1:SetOperation(c57355219.activate1)
c:RegisterEffect(e1)
--Activate(effect)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_CHAINING)
e2:SetCondition(c57355219.condition2)
e2:SetCost(c57355219.cost)
e2:SetTarget(c57355219.target2)
e2:SetOperation(c57355219.activate2)
c:RegisterEffect(e2)
end
function c57355219.condition1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==0
end
function c57355219.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:IsAbleToRemoveAsCost()
end
function c57355219.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c57355219.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c57355219.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_TEMPORARY)
e:SetLabelObject(g:GetFirst())
end
function c57355219.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
function c57355219.activate1(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg:GetFirst())
Duel.Destroy(eg,REASON_EFFECT)
local tc=e:GetLabelObject()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
e1:SetOperation(c57355219.retop)
tc:SetTurnCounter(0)
Duel.RegisterEffect(e1,tp)
end
function c57355219.condition2(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainInactivatable(ev)
end
function c57355219.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c57355219.activate2(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
local tc=e:GetLabelObject()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
e1:SetOperation(c57355219.retop)
tc:SetTurnCounter(0)
Duel.RegisterEffect(e1,tp)
end
function c57355219.retop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()==tp then
local c=e:GetLabelObject()
local ct=c:GetTurnCounter()
c:SetTurnCounter(ct+1)
if ct==1 then
Duel.ReturnToField(c,POS_FACEUP_ATTACK)
end
end
end
--波動再生
function c60312997.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c60312997.condition)
e1:SetTarget(c60312997.target)
e1:SetOperation(c60312997.operation)
c:RegisterEffect(e1)
end
function c60312997.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()==nil
and eg:GetFirst():IsLocation(LOCATION_MZONE)
end
function c60312997.filter(c,lv)
return c:IsLevelBelow(lv) and c:IsType(TYPE_SYNCHRO) and c:IsStatus(STATUS_PROC_COMPLETE)
end
function c60312997.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c60312997.filter(chkc,eg:GetFirst():GetLevel()) end
if chk==0 then return Duel.IsExistingTarget(c60312997.filter,tp,LOCATION_GRAVE,0,1,nil,eg:GetFirst():GetLevel()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c60312997.filter,tp,LOCATION_GRAVE,0,1,1,nil,eg:GetFirst():GetLevel())
end
function c60312997.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
e1:SetTargetRange(1,0)
e1:SetValue(c60312997.damval)
Duel.RegisterEffect(e1,tp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_DAMAGE_STEP_END)
e2:SetOperation(c60312997.spop)
e2:SetLabelObject(tc)
e2:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e2,tp)
end
end
function c60312997.damval(e,re,val,r,rp,rc)
if r==REASON_BATTLE then
return val/2
else return val end
end
function c60312997.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
local tc=e:GetLabelObject()
if tc:IsLocation(LOCATION_GRAVE) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--闘争本能
function c60534585.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c60534585.condition)
e1:SetCost(c60534585.target)
e1:SetOperation(c60534585.operation)
c:RegisterEffect(e1)
end
function c60534585.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()==nil
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c60534585.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c60534585.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)~=0
and Duel.IsExistingMatchingCard(c60534585.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c60534585.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c60534585.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()~=0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end
end
--召喚の呪詛
function c61650133.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--maintain
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetOperation(c61650133.mtop)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(61650133,0))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_SZONE)
e3:SetTarget(c61650133.rmtg)
e3:SetOperation(c61650133.rmop)
c:RegisterEffect(e3)
end
function c61650133.mtop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()~=tp then return end
if Duel.GetLP(tp)>500 and Duel.SelectYesNo(tp,aux.Stringid(61650133,0)) then
Duel.PayLPCost(tp,500)
else
Duel.Destroy(e:GetHandler(),REASON_RULE)
end
end
function c61650133.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e) end
end
function c61650133.rmop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local rm1=false
local rm2=false
local tc=eg:GetFirst()
while tc do
if tc:IsLocation(LOCATION_ONFIELD) and tc:IsFaceup() then
if tc:IsControler(tp) then rm1=true else rm2=true end
end
tc=eg:GetNext()
end
local g=Group.CreateGroup()
if rm1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,1,nil)
g:Merge(g1)
end
if rm2 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,1,nil)
g:Merge(g2)
end
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
--疫病
function c62472614.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c62472614.target)
e1:SetOperation(c62472614.operation)
c:RegisterEffect(e1)
--Atk,def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_SET_ATTACK)
e2:SetValue(0)
c:RegisterEffect(e2)
--Equip limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(c62472614.eqlimit)
c:RegisterEffect(e3)
--damage
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(62472614,0))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_REPEAT)
e4:SetCode(EVENT_PHASE+PHASE_STANDBY)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1)
e4:SetCondition(c62472614.damcon)
e4:SetTarget(c62472614.damtg)
e4:SetOperation(c62472614.damop)
c:RegisterEffect(e4)
end
function c62472614.eqlimit(e,c)
return c:IsRace(RACE_WARRIOR+RACE_BEASTWARRIOR+RACE_SPELLCASTER)
end
function c62472614.filter(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR+RACE_BEASTWARRIOR+RACE_SPELLCASTER)
end
function c62472614.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and c62472614.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c62472614.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c62472614.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c62472614.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c62472614.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c62472614.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local damp=e:GetHandler():GetEquipTarget():GetControler()
Duel.SetTargetPlayer(damp)
Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,damp,500)
end
function c62472614.damop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local damp=e:GetHandler():GetEquipTarget():GetControler()
local d=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
Duel.Damage(damp,d,REASON_EFFECT)
end
--トラファスフィア
function c72144675.initial_effect(c)
--tribute limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRIBUTE_LIMIT)
e1:SetValue(c72144675.tlimit)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetValue(c72144675.efilter)
c:RegisterEffect(e2)
end
function c72144675.tlimit(e,c)
return not c:IsRace(RACE_WINDBEAST)
end
function c72144675.efilter(e,te)
return te:IsActiveType(TYPE_TRAP)
end
--ライト·オブ·デストラクション
function c83027236.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--discard deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(83027236,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCategory(CATEGORY_DECKDES)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c83027236.condtion)
e2:SetTarget(c83027236.target)
e2:SetOperation(c83027236.operation)
c:RegisterEffect(e2)
end
function c83027236.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_DECK) and c:GetPreviousControler()==tp
end
function c83027236.condtion(e,tp,eg,ep,ev,re,r,rp)
if not re then return false end
local rc=re:GetHandler()
return rp~=tp and bit.band(r,REASON_EFFECT)~=0 and eg:IsExists(c83027236.cfilter,1,nil,1-tp)
end
function c83027236.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,3)
end
function c83027236.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.DiscardDeck(1-tp,3,REASON_EFFECT)
end
--ビーストライザー
function c84962466.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetTarget(c84962466.target1)
e1:SetOperation(c84962466.operation)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(84962466,1))
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(TIMING_DAMAGE_STEP)
e2:SetTarget(c84962466.target2)
e2:SetOperation(c84962466.operation)
c:RegisterEffect(e2)
end
function c84962466.cfilter(c,tp)
return c:IsFaceup() and c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR) and c:IsAbleToRemove()
and Duel.IsExistingTarget(c84962466.filter,tp,LOCATION_MZONE,0,1,c)
end
function c84962466.filter(c)
return c:IsFaceup() and c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR)
end
function c84962466.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c84962466.filter(chkc) end
if chk==0 then
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or Duel.IsExistingMatchingCard(c84962466.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
if Duel.GetCurrentPhase()==PHASE_DAMAGE or
Duel.IsExistingMatchingCard(c84962466.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(84962466,0)) then
e:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
local rg=Duel.SelectMatchingCard(tp,c84962466.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
e:SetLabel(rg:GetFirst():GetBaseAttack())
Duel.Remove(rg,POS_FACEUP,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c84962466.filter,tp,LOCATION_MZONE,0,1,1,nil)
e:GetHandler():RegisterFlagEffect(84962466,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
else e:SetProperty(EFFECT_FLAG_DAMAGE_STEP) end
end
function c84962466.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c84962466.filter(chkc) end
if chk==0 then return e:GetHandler():GetFlagEffect(84962466)==0
and Duel.IsExistingMatchingCard(c84962466.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,c84962466.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
e:SetLabel(rg:GetFirst():GetBaseAttack())
Duel.Remove(rg,POS_FACEUP,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c84962466.filter,tp,LOCATION_MZONE,0,1,1,nil)
e:GetHandler():RegisterFlagEffect(84962466,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
function c84962466.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(e:GetLabel())
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
end
end
--ビッグ·ワン·ウォリアー
function c89235196.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(89235196,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c89235196.spcost)
e1:SetTarget(c89235196.sptg)
e1:SetOperation(c89235196.spop)
c:RegisterEffect(e1)
end
function c89235196.cfilter(c)
return c:GetLevel()==1 and c:IsAbleToGraveAsCost()
end
function c89235196.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c89235196.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.ConfirmCards(1-tp,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c89235196.cfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler())
Duel.SendtoGrave(g,REASON_EFFECT)
Duel.ShuffleHand(tp)
end
function c89235196.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c89235196.spop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
if not c:IsRelateToEffect(e) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
--波動障壁
function c96700602.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c96700602.condition)
e1:SetCost(c96700602.cost)
e1:SetTarget(c96700602.target)
e1:SetOperation(c96700602.operation)
c:RegisterEffect(e1)
end
function c96700602.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c96700602.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsType,1,nil,TYPE_SYNCHRO) end
local g=Duel.SelectReleaseGroup(tp,Card.IsType,1,1,nil,TYPE_SYNCHRO)
Duel.Release(g,REASON_COST)
end
function c96700602.cfilter(c,lv)
return c:IsLevelBelow(lv) and c:IsType(TYPE_SYNCHRO) and c:IsStatus(STATUS_PROC_COMPLETE)
end
function c96700602.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAttack,tp,0,LOCATION_MZONE,1,nil) end
local tc=eg:GetFirst()
if tc:IsLocation(LOCATION_MZONE) then
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,tc:GetDefence())
end
end
function c96700602.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local g=Duel.GetMatchingGroup(Card.IsAttack,tp,0,LOCATION_MZONE,nil)
if Duel.ChangePosition(g,POS_FACEUP_DEFENCE,POS_FACEDOWN_DEFENCE,0,0)~=0 then
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Damage(1-tp,tc:GetDefence(),REASON_EFFECT)
end
end
end
...@@ -27,12 +27,13 @@ function c96765646.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -27,12 +27,13 @@ function c96765646.activate(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetOperation(c96765646.desop) e1:SetOperation(c96765646.desop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
tc:RegisterEffect(e1) tc:RegisterEffect(e1,true)
end end
end end
function c96765646.desop(e,tp,eg,ep,ev,re,r,rp) function c96765646.desop(e,tp,eg,ep,ev,re,r,rp)
......
--野生の咆哮
function c97922283.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--no damage & spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(97922283,0))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c97922283.condition)
e2:SetCost(c97922283.target)
e2:SetOperation(c97922283.operation)
c:RegisterEffect(e2)
end
function c97922283.condition(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local bc=tc:GetBattleTarget()
return tc:IsRelateToBattle() and tc:IsControler(tp) and tc:IsRace(RACE_BEAST)
and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE)
end
function c97922283.filter(c)
return c:IsFaceup() and c:IsRace(RACE_BEAST)
end
function c97922283.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
local dam=Duel.GetMatchingGroupCount(c97922283.filter,tp,LOCATION_MZONE,0,nil)*300
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
function c97922283.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local dam=Duel.GetMatchingGroupCount(c97922283.filter,tp,LOCATION_MZONE,0,nil)*300
Duel.Damage(p,dam,REASON_EFFECT)
end
--災いの装備品
function c98867329.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c98867329.target)
e1:SetOperation(c98867329.operation)
c:RegisterEffect(e1)
--Atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(c98867329.atkval)
c:RegisterEffect(e2)
--Equip limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(1)
c:RegisterEffect(e3)
--equip
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(98867329,0))
e4:SetCategory(CATEGORY_EQUIP)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c98867329.eqcon)
e4:SetTarget(c98867329.eqtg)
e4:SetOperation(c98867329.operation)
c:RegisterEffect(e4)
end
function c98867329.atkval(e,c)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)*-600
end
function c98867329.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c98867329.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c98867329.eqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c98867329.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
--ビーストレイジ
function c9999961.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c9999961.target)
e1:SetOperation(c9999961.activate)
c:RegisterEffect(e1)
end
function c9999961.rfilter(c)
return c:IsFaceup() and c:IsRace(RACE_BEAST+RACE_WINDBEAST)
end
function c9999961.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c9999961.rfilter,tp,LOCATION_REMOVED,0,1,nil) end
end
function c9999961.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local atk=Duel.GetMatchingGroupCount(c9999961.rfilter,tp,LOCATION_REMOVED,0,nil)*200
if g:GetCount()==0 or atk==0 then return end
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(atk)
tc:RegisterEffect(e1)
tc=g:GetNext()
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