Commit be04d43e authored by mercury233's avatar mercury233

update new cards

parent 11164a96
#created by ... #created by ...
#main #main
101201061
100207028
100428032
100428033
100428034
100428038
100200235 100200235
101201007 101201007
101201008 101201008
...@@ -36,6 +42,8 @@ ...@@ -36,6 +42,8 @@
101201064 101201064
100200001 100200001
#extra #extra
100428035
100428036
101201035 101201035
101201039 101201039
101201040 101201040
......
--トランザクション・ロールバック
--Script by mercury233
local s,id,o=GetID()
function s.initial_effect(c)
--copy oppo trap
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetHintTiming(TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
--copy self trap
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id)
e2:SetHintTiming(TIMINGS_CHECK_MONSTER+TIMING_CHAIN_END+TIMING_END_PHASE)
e2:SetCost(s.cost2)
e2:SetTarget(s.target)
e2:SetOperation(s.operation)
c:RegisterEffect(e2)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function s.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() end
Duel.Remove(c,POS_FACEUP,REASON_COST)
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function s.filter(c)
return c:GetType()==TYPE_TRAP and not c:IsCode(id) and c:CheckActivateEffect(false,true,false)~=nil
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then
local te=e:GetLabelObject()
local tg=te:GetTarget()
return tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)
end
local loc1,loc2=0,LOCATION_GRAVE
if e:GetType()&EFFECT_TYPE_QUICK_O>0 then loc1,loc2=LOCATION_GRAVE,0 end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,loc1,loc2,1,nil) end
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,s.filter,tp,loc1,loc2,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true)
Duel.ClearTargetCard()
g:GetFirst():CreateEffectRelation(e)
local tg=te:GetTarget()
e:SetProperty(te:GetProperty())
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if not te then return end
local tc=te:GetHandler()
if not (tc:IsRelateToEffect(e) and tc:GetType()==TYPE_TRAP) then return end
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
--BK アッパーカッター
--Script by Chrono-Genex
function c100428032.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100428032,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,100428032)
e1:SetTarget(c100428032.thtg)
e1:SetOperation(c100428032.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--leave grave
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,100428032)
e3:SetCondition(c100428032.lgcon)
e3:SetTarget(c100428032.lgtg)
e3:SetOperation(c100428032.lgop)
c:RegisterEffect(e3)
end
function c100428032.thfilter(c)
return (c:IsSetCard(0x1084) and c:IsType(TYPE_MONSTER) and not c:IsCode(100428032)
or c:IsSetCard(0x299) and c:IsType(TYPE_COUNTER)) and c:IsAbleToHand()
end
function c100428032.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100428032.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100428032.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100428032.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c100428032.lgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c100428032.spfilter(c,e,tp)
return c:IsSetCard(0x1084) and c:IsType(TYPE_MONSTER) and not c:IsCode(100428032) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100428032.setfilter(c)
return c:IsSetCard(0x299) and c:IsType(TYPE_COUNTER) and c:IsSSetable()
end
function c100428032.lgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100428032.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
local b2=Duel.IsExistingMatchingCard(c100428032.setfilter,tp,LOCATION_GRAVE,0,1,nil)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(100428032,1),aux.Stringid(100428032,2))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(100428032,1))
else op=Duel.SelectOption(tp,aux.Stringid(100428032,2))+1 end
e:SetLabel(op)
if op==0 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
else
e:SetCategory(CATEGORY_LEAVE_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE)
end
end
function c100428032.lgop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100428032.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100428032.setfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g)
end
end
end
--BK チーフセコンド
--Script by Chrono-Genex
function c100428033.initial_effect(c)
--negate attack
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100428033,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100428033)
e1:SetCondition(c100428033.spcon)
e1:SetTarget(c100428033.sptg)
e1:SetOperation(c100428033.spop)
c:RegisterEffect(e1)
--extra summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100428033,1))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x1084))
c:RegisterEffect(e2)
end
function c100428033.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
function c100428033.cfilter(c)
return c:IsFaceup() and (c:IsRace(RACE_WARRIOR) or c:IsAttribute(ATTRIBUTE_FIRE))
end
function c100428033.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c100428033.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c100428033.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0
and Duel.NegateAttack() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.BreakEffect()
Duel.HintSelection(g)
if Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
tc:RegisterFlagEffect(100428033,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
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)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
e1:SetCondition(c100428033.retcon)
e1:SetOperation(c100428033.retop)
Duel.RegisterEffect(e1,tp)
end
end
end
end
function c100428033.retcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetFlagEffect(100428033)~=0
end
function c100428033.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
--BK プロモーター
--Script by Chrono-Genex
function c100428034.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100428034,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100428034)
e1:SetCondition(c100428034.spcon)
e1:SetCost(c100428034.cost)
e1:SetTarget(c100428034.sptg1)
e1:SetOperation(c100428034.spop1)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100428034,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100428034+100)
e2:SetCost(c100428034.spcost)
e2:SetTarget(c100428034.sptg2)
e2:SetOperation(c100428034.spop2)
c:RegisterEffect(e2)
--level
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100428034,2))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,100428034+200)
e3:SetCost(c100428034.lvcost)
e3:SetTarget(c100428034.lvtg)
e3:SetOperation(c100428034.lvop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(100428034,ACTIVITY_SPSUMMON,c100428034.counterfilter)
end
function c100428034.counterfilter(c)
return c:IsSetCard(0x1084)
end
function c100428034.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(100428034,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c100428034.splimit)
e1:SetLabelObject(e)
Duel.RegisterEffect(e1,tp)
end
function c100428034.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x1084)
end
function c100428034.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function c100428034.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c100428034.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c100428034.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable()
and c100428034.cost(e,tp,eg,ep,ev,re,r,rp,0) end
Duel.Release(c,REASON_COST+REASON_RELEASE)
c100428034.cost(e,tp,eg,ep,ev,re,r,rp,1)
end
function c100428034.spfilter(c,e,tp)
return c:IsSetCard(0x1084) and not c:IsCode(100428034) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100428034.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c100428034.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c100428034.spop2(e,tp,eg,ep,ev,re,r,rp)
local ft=math.min(2,(Duel.GetLocationCount(tp,LOCATION_MZONE)))
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetMatchingGroup(c100428034.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,ft)
if sg then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
function c100428034.lvcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost()
and c100428034.cost(e,tp,eg,ep,ev,re,r,rp,0) end
Duel.Remove(c,POS_FACEUP,REASON_COST)
c100428034.cost(e,tp,eg,ep,ev,re,r,rp,1)
end
function c100428034.lvfilter(c)
return c:IsFaceup() and c:IsSetCard(0x1084) and c:IsLevelAbove(1)
end
function c100428034.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100428034.lvfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function c100428034.lvop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c100428034.lvfilter,tp,LOCATION_MZONE,0,nil)
local sel=0
local lv=1
if not g:IsExists(Card.IsLevelAbove,1,nil,2) then
sel=Duel.SelectOption(tp,aux.Stringid(100428034,3))
else
sel=Duel.SelectOption(tp,aux.Stringid(100428034,3),aux.Stringid(100428034,4))
end
if sel==1 then
lv=-1
end
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
--CNo.79 BK 将星のカエサル
--Script by Chrono-Genex
function c100428035.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,5,3)
c:EnableReviveLimit()
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c100428035.atkval)
c:RegisterEffect(e1)
--disable special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100428035,0))
e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_SPSUMMON)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c100428035.discon)
e2:SetTarget(c100428035.distg)
e2:SetOperation(c100428035.disop)
c:RegisterEffect(e2)
--material
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100428035,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c100428035.tgcon)
e3:SetTarget(c100428035.tgtg)
e3:SetOperation(c100428035.tgop)
c:RegisterEffect(e3)
end
aux.xyz_number[100428035]=79
function c100428035.atkval(e,c)
return c:GetOverlayCount()*200
end
function c100428035.discon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and Duel.GetCurrentChain()==0
end
function c100428035.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_EFFECT) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function c100428035.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() and c:RemoveOverlayCard(tp,2,2,REASON_EFFECT)>0 then
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c100428035.tgcon(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,71921856) then return false end
local a,d=Duel.GetBattleMonster(tp)
if a and d and a:IsFaceup() and a:IsSetCard(0x1084) then
e:SetLabelObject(d)
return true
else return false end
end
function c100428035.tgfilter(c)
return c:IsSetCard(0x1084) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c100428035.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetLabelObject()
if chk==0 then return tc:IsCanOverlay()
and Duel.IsExistingMatchingCard(c100428035.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c100428035.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100428035.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0
and g:GetFirst():IsLocation(LOCATION_GRAVE) then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() and tc:IsControler(1-tp) then
Duel.Overlay(c,tc)
end
end
end
--BK キング・デンプシー
--Script by Chrono-Genex
function c100428036.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100428036,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,100428036)
e1:SetTarget(c100428036.thtg)
e1:SetOperation(c100428036.thop)
c:RegisterEffect(e1)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100428036,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100428036+100)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetTarget(c100428036.tgtg)
e2:SetOperation(c100428036.tgop)
c:RegisterEffect(e2)
end
function c100428036.thfilter(c)
return (c:IsLevelBelow(4) and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE)
or c:IsSetCard(0x2084) and c:IsType(TYPE_SPELL+TYPE_TRAP)) and (c:IsAbleToHand() or c:IsAbleToGrave())
end
function c100428036.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100428036.thfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c100428036.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c100428036.thfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if not tc then return end
if tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1190,1191)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function c100428036.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_EFFECT) end
end
function c100428036.tgop(e,tp,eg,ep,ev,re,r,rp)
if Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_EFFECT)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x1084))
e1:SetValue(c100428036.tgval)
e1:SetOwnerPlayer(tp)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c100428036.tgval(e,re,rp)
return rp==1-e:GetOwnerPlayer()
end
--バーニングナックル・クロスカウンター
--Script by Chrono-Genex
function c100428038.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,100428038+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c100428038.condition)
e1:SetTarget(c100428038.target)
e1:SetOperation(c100428038.activate)
c:RegisterEffect(e1)
end
function c100428038.condition(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end
function c100428038.desfilter(c)
return c:IsFaceup() and c:IsSetCard(0x48,0x1084) and c:IsType(TYPE_XYZ)
end
function c100428038.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100428038.desfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
local g=Duel.GetMatchingGroup(c100428038.desfilter,tp,LOCATION_MZONE,0,nil)
local ct=1
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
g:Merge(eg)
ct=ct+1
end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,ct,0,0)
end
function c100428038.spfilter(c,e,tp,code)
return c:IsSetCard(0x1084) and c:IsType(TYPE_XYZ) and not c:IsCode(code)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c100428038.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,c100428038.desfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=dg:GetFirst()
if tc then
Duel.HintSelection(dg)
if Duel.Destroy(tc,REASON_EFFECT)~=0 and Duel.NegateActivation(ev)
and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 then
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c100428038.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp,tc:GetCode())
if g:GetCount()>0 and c:IsRelateToChain() and c:IsCanOverlay()
and Duel.SelectYesNo(tp,aux.Stringid(100428038,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=g:Select(tp,1,1,nil):GetFirst()
if Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)~=0 then
c:CancelToGrave()
Duel.Overlay(sc,c)
end
end
end
end
end
--融合強兵
--Script by mercury233
local s,id,o=GetID()
function s.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.ffilter(c,e,tp)
return c:IsType(TYPE_FUSION)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,c,e,tp)
end
function s.spfilter(c,fc,e,tp)
if not (aux.IsMaterialListCode(fc,c:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end
if c:IsLocation(LOCATION_EXTRA) then
return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
else
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.ffilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA+LOCATION_GRAVE)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local tc=Duel.SelectMatchingCard(tp,s.ffilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
if tc then
Duel.ConfirmCards(1-tp,tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,nil,tc,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
local c=e:GetHandler()
local sc=g:GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
sc:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE)
sc:RegisterEffect(e2,true)
local e3=e1:Clone()
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
sc:RegisterEffect(e3,true)
end
end
end
...@@ -21,10 +21,11 @@ function s.initial_effect(c) ...@@ -21,10 +21,11 @@ function s.initial_effect(c)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0)) e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION) e3:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetHintTiming(TIMING_END_PHASE)
e3:SetCountLimit(1,id) e3:SetCountLimit(1,id)
e3:SetCondition(s.condition) e3:SetCondition(s.condition)
e3:SetTarget(s.target) e3:SetTarget(s.target)
...@@ -43,7 +44,7 @@ function s.indct(e,re,r,rp) ...@@ -43,7 +44,7 @@ function s.indct(e,re,r,rp)
else return 0 end else return 0 end
end end
function s.condition(e,tp,eg,ep,ev,re,r,rp) function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_END
and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end end
function s.filter(c,check) function s.filter(c,check)
......
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