Commit c7a1a05a authored by 聖園ミカ's avatar 聖園ミカ 🐟

clean

parent e5c396ff
No preview for this file type
-- 宣戦布告
function c24400001.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,24400001+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c24400001.target)
e1:SetOperation(c24400001.activate)
c:RegisterEffect(e1)
end
c24400001.named_with_ZhanShuRenXing=true
function c24400001.spfil(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c.named_with_TeZhanRenXing
end
function c24400001.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local b1=Duel.IsExistingMatchingCard(c24400001.spfil,tp,LOCATION_EXTRA,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
local b2=Duel.IsPlayerCanDraw(tp,1)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(24400001,0),aux.Stringid(24400001,1))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(24400001,0))
else
op=Duel.SelectOption(tp,aux.Stringid(24400001,1))+1
end
if op==0 then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
else
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
e:SetLabel(op)
end
function c24400001.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local op=e:GetLabel()
if op==0 then
local g=Duel.GetMatchingGroup(c24400001.spfil,tp,LOCATION_EXTRA,0,nil,e,tp)
if g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP)
end
local e0=Effect.CreateEffect(e:GetHandler())
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetTargetRange(1,0)
e0:SetTarget(c24400001.splimit)
e0:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e0,tp)
else
local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
if tc==nil then return end
Duel.Draw(tp,1,REASON_EFFECT)
if tc.named_with_ZhanShuRenXing and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(24400001,2)) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoDeck(tc,tp,2,REASON_EFFECT)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetOperation(c24400001.disop)
Duel.RegisterEffect(e1,p)
end
function c24400001.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(e:GetOwnerPlayer(),LOCATION_HAND,0)
Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)
end
function c24400001.splimit(e,c)
return not (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing) and c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
--404
function c24400002.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,24400002+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c24400002.target)
e1:SetOperation(c24400002.activate)
c:RegisterEffect(e1)
end
c24400002.named_with_ZhanShuRenXing=true
function c24400002.filter(c,e,tp)
return c:IsCode(24400034,24400035,24400041,24400042) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c24400002.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c24400002.filter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE)
end
function c24400002.activate(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,c24400002.filter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--SOPMODII-JR
function c24400003.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,24400003)
e1:SetCondition(c24400003.spcon)
c:RegisterEffect(e1)
--nontuner
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_NONTUNER)
e2:SetCondition(c24400003.tncon)
e2:SetValue(c24400003.tnval)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCondition(c24400003.thcon)
e3:SetTarget(c24400003.thtg)
e3:SetOperation(c24400003.thop)
c:RegisterEffect(e3)
--search
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(24400003,1))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetTarget(c24400003.thtg1)
e4:SetOperation(c24400003.thop1)
c:RegisterEffect(e4)
end
c24400003.named_with_ZhanShuRenXing=true
function c24400003.filter(c)
return c:IsFaceup() and c.named_with_ZhanShuRenXing
end
function c24400003.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(c24400003.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c24400003.tnckfil(c)
return c:IsRace(RACE_MACHINE) and c:IsFaceup()
end
function c24400003.tncon(e,c)
local tp=e:GetHandlerPlayer()
return Duel.GetMatchingGroup(c24400003.tnckfil,tp,LOCATION_MZONE,0,e:GetHandler()):GetCount()==0
end
function c24400003.tnval(e,c)
return e:GetHandler():IsControler(c:GetControler())
end
function c24400003.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end
function c24400003.thfilter(c)
return c.named_with_ZhanShuRenXing and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c24400003.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400003.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c24400003.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c24400003.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 c24400003.xthfilter(c)
return c:IsCode(24400005) and c:IsAbleToHand()
end
function c24400003.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c24400003.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.GetFirstMatchingCard(c24400003.xthfilter,tp,LOCATION_DECK,0,nil)
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--愛搗蛋的雙組
function c24400004.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,1,99,c24400004.lcheck)
c:EnableReviveLimit()
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,24400004)
e1:SetTarget(c24400004.sptg)
e1:SetOperation(c24400004.spop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,24400104)
e2:SetCost(c24400004.spcost1)
e2:SetTarget(c24400004.sptg1)
e2:SetOperation(c24400004.spop1)
c:RegisterEffect(e2)
end
c24400004.named_with_TeZhanRenXing=true
function c24400004.mckfil(c)
return c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing
end
function c24400004.lcheck(g)
return g:IsExists(c24400004.mckfil,1,nil)
end
function c24400004.spfil(c,e,tp)
local zone=e:GetHandler():GetLinkedZone()
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) and c:IsLocation(LOCATION_GRAVE)
end
function c24400004.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local mg=c:GetMaterial()
if chk==0 then return mg:IsExists(c24400004.spfil,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_GRAVE)
end
function c24400004.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=c:GetMaterial()
local zone=c:GetLinkedZone()
local g=mg:Filter(c24400004.spfil,nil,e,tp)
if g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local tc=g:Select(tp,1,1,nil):GetFirst()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e1,true)
end
end
function c24400004.filter(c,e,tp)
return c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevel(1)
end
function c24400004.ctfil(c)
return c.named_with_TeZhanRenXing and c:IsAbleToRemoveAsCost()
end
function c24400004.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400004.ctfil,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c24400004.ctfil,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c24400004.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c24400004.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
function c24400004.spop1(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,c24400004.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e1,true)
end
end
--兵蚁
function c24400005.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,24400005)
e1:SetCondition(c24400005.spcon)
c:RegisterEffect(e1)
--nontuner
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_NONTUNER)
e2:SetCondition(c24400005.tncon)
e2:SetValue(c24400005.tnval)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCondition(c24400005.thcon)
e3:SetTarget(c24400005.thtg)
e3:SetOperation(c24400005.thop)
c:RegisterEffect(e3)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400005,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetTarget(c24400005.thtg1)
e2:SetOperation(c24400005.thop1)
c:RegisterEffect(e2)
end
c24400005.named_with_ZhanShuRenXing=true
function c24400005.filter(c)
return c:IsFaceup() and c.named_with_ZhanShuRenXing
end
function c24400005.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(c24400005.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c24400005.tnckfil(c)
return c:IsRace(RACE_MACHINE) and c:IsFaceup()
end
function c24400005.tncon(e,c)
local tp=e:GetHandlerPlayer()
return Duel.GetMatchingGroup(c24400005.tnckfil,tp,LOCATION_MZONE,0,e:GetHandler()):GetCount()==0
end
function c24400005.tnval(e,c)
return e:GetHandler():IsControler(c:GetControler())
end
function c24400005.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end
function c24400005.thfilter(c)
return c.named_with_ZhanShuRenXing and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c24400005.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400005.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c24400005.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c24400005.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 c24400005.xthfilter(c)
return c:IsCode(24400005) and c:IsAbleToHand()
end
function c24400005.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c24400005.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.GetFirstMatchingCard(c24400005.xthfilter,tp,LOCATION_DECK,0,nil)
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--補給官的支援
function c24400006.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,24400006+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c24400006.target)
e1:SetOperation(c24400006.activate)
c:RegisterEffect(e1)
end
c24400006.named_with_ZhanShuRenXing=true
function c24400006.filter(c)
return c.named_with_ZhanShuRenXing and c:IsAbleToHand()
end
function c24400006.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400006.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
if Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL)>=3 then
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DRAW)
end
end
function c24400006.ckfil(c)
return c:IsType(TYPE_SPELL) and c.named_with_ZhanShuRenXing
end
function c24400006.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c24400006.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if Duel.IsPlayerCanDraw(tp,1)
and Duel.GetMatchingGroupCount(c24400006.ckfil,tp,LOCATION_GRAVE,0,nil)>=3
and Duel.SelectYesNo(tp,aux.Stringid(24400006,0)) then
Duel.BreakEffect()
Duel.ShuffleDeck(tp)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
--充电时光
function c24400007.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c24400007.actg)
e1:SetOperation(c24400007.acop)
c:RegisterEffect(e1)
end
c24400007.named_with_ZhanShuRenXing=true
function c24400007.ovfil(c)
return (c.named_with_ZhanShuRenXing and c:IsType(TYPE_MONSTER)) or c:IsRace(RACE_MACHINE)
end
function c24400007.actg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_MZONE,0,1,nil,TYPE_XYZ) and Duel.IsExistingMatchingCard(c24400007.ovfil,tp,LOCATION_DECK,0,2,nil) end
Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_MZONE,0,1,1,nil,TYPE_XYZ)
end
function c24400007.acop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local g=Duel.GetMatchingGroup(c24400007.ovfil,tp,LOCATION_DECK,0,nil)
if tc:IsRelateToEffect(e) then
local sg=g:Select(tp,2,2,nil)
Duel.Overlay(tc,sg)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_SKIP_DP)
e1:SetTargetRange(1,0)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_DRAW then
e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN,2)
else
e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN)
end
Duel.RegisterEffect(e1,tp)
end
--电子战
function c24400008.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400008,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,24400008+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c24400008.cost)
e1:SetTarget(c24400008.target)
e1:SetOperation(c24400008.activate)
c:RegisterEffect(e1)
end
c24400008.named_with_ZhanShuRenXing=true
c24400008.assault_name=24400008
function c24400008.cfilter1(c)
return c:IsAbleToGraveAsCost()
end
function c24400008.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400008.cfilter1,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c24400008.cfilter1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c24400008.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c24400008.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
--格里芬作战指挥部
function c24400009.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,24400009)
e1:SetOperation(c24400009.activate)
c:RegisterEffect(e1)
--atk/def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTarget(c24400009.atktg)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetValue(500)
c:RegisterEffect(e2)
local e22=e2:Clone()
e22:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e22)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,24400109)
e3:SetCost(c24400009.spcost)
e3:SetTarget(c24400009.sptg)
e3:SetOperation(c24400009.spop)
c:RegisterEffect(e3)
end
c24400009.named_with_ZhanShuRenXing=true
function c24400009.thfilter(c)
return c.named_with_ZhanShuRenXing and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c24400009.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(24400009,1))
local g=Duel.GetMatchingGroup(c24400009.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(24400009,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c24400009.atktg(e,c)
return c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing
end
function c24400009.costfilter(c)
return c.named_with_ZhanShuRenXing and c:IsAbleToGraveAsCost()
end
function c24400009.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400009.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c24400009.costfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c24400009.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c.named_with_ZhanShuRenXing and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c24400009.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c24400009.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c24400009.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,c24400009.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c24400009.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c24400009.splimit(e,c)
return not (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
\ No newline at end of file
--洪流
function c24400010.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c24400010.cost)
e1:SetTarget(c24400010.actg)
e1:SetOperation(c24400010.acop)
c:RegisterEffect(e1)
end
c24400010.named_with_ZhanShuRenXing=true
function c24400010.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,2,nil) end
Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,2,2,REASON_COST)
end
function c24400010.spfil(c,e,tp)
return (c.named_with_ZhanShuRenXing or c:IsLevel(1)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c24400010.xxfil(c)
return c.named_with_ZhanShuRenXing
end
function c24400010.gck(g)
return g:IsExists(c24400010.xxfil,1,nil) and g:IsExists(Card.IsLevel,1,nil,1)
end
function c24400010.actg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c24400010.spfil,tp,LOCATION_DECK,0,nil,e,tp)
if chk==0 then return g:CheckSubGroup(c24400010.gck,2,2) and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 and not Duel.IsPlayerAffectedByEffect(tp,59822133) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,2,nil,tp,LOCATION_DECK)
end
function c24400010.acop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c24400010.spfil,tp,LOCATION_DECK,0,nil,e,tp)
if g:CheckSubGroup(c24400010.gck,2,2) and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 and not Duel.IsPlayerAffectedByEffect(tp,59822133) then
local sg=g:SelectSubGroup(tp,c24400010.gck,false,2,2)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_SKIP_DP)
e1:SetTargetRange(1,0)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_DRAW then
e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN,2)
else
e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN)
end
Duel.RegisterEffect(e1,tp)
end
--后勤支援
function c24400011.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400011,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,24400011+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c24400011.target)
e1:SetOperation(c24400011.operation)
c:RegisterEffect(e1)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400011,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,24400011+EFFECT_COUNT_CODE_OATH)
e2:SetTarget(c24400011.target1)
e2:SetOperation(c24400011.activate1)
c:RegisterEffect(e2)
--Destroy2
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(c24400011.descon2)
e4:SetOperation(c24400011.desop2)
c:RegisterEffect(e4)
end
c24400011.named_with_ZhanShuRenXing=true
function c24400011.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevel(5) and c.named_with_TeZhanRenXing and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c24400011.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c24400011.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c24400011.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.SelectMatchingCard(tp,c24400011.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
if c:IsRelateToEffect(e) and tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
c:SetCardTarget(tc)
end
Duel.SpecialSummonComplete()
end
function c24400011.descon2(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetFirstCardTarget()
return tc and eg:IsContains(tc)
end
function c24400011.desop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function c24400011.rmfil(c)
return c:IsAbleToRemove() and c.named_with_ZhanShuRenXing
end
function c24400011.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400011.rmfil,tp,LOCATION_DECK,0,2,nil,tp,POS_FACEDOWN) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,2,tp,LOCATION_DECK)
end
function c24400011.activate1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c24400011.rmfil,tp,LOCATION_DECK,0,2,2,nil,tp,POS_FACEDOWN)
if g and Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)~=0 and e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local tc=g:GetFirst()
while tc do
tc:RegisterFlagEffect(24400011,RESET_EVENT+RESETS_STANDARD,0,1)
tc=g:GetNext()
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
e1:SetCondition(c24400011.thcon)
e1:SetOperation(c24400011.thop)
e1:SetLabel(0)
g:KeepAlive()
e1:SetLabelObject(g)
c:RegisterEffect(e1)
end
end
end
function c24400011.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c24400011.thop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
e:GetHandler():SetTurnCounter(ct+1)
if ct==1 then
Duel.Destroy(e:GetHandler(),REASON_RULE)
local g=e:GetLabelObject()
local tc1=g:GetFirst()
local tc2=g:GetNext()
if tc1:GetFlagEffect(24400011)~=0 and tc2:GetFlagEffect(24400011)~=0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
else e:SetLabel(1) end
end
--即時反撲
function c24400012.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c24400012.condition)
e1:SetCost(c24400012.cost)
e1:SetTarget(c24400012.target)
e1:SetOperation(c24400012.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2)
end
c24400012.named_with_ZhanShuRenXing=true
function c24400012.condition(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsHasType(EFFECT_TYPE_ACTIVATE)
and re:IsActiveType(TYPE_TRAP) and Duel.IsChainNegatable(ev)
end
function c24400012.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
end
function c24400012.setfilter(c)
return c:IsType(TYPE_TRAP) and c:IsSSetable(true)
end
function c24400012.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 c24400012.activate(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) and rc:IsCanTurnSet() then
rc:CancelToGrave()
Duel.ChangePosition(rc,POS_FACEDOWN)
Duel.RaiseEvent(rc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
local g=Duel.GetMatchingGroup(c24400012.setfilter,tp,0,LOCATION_DECK,nil)
if g:GetCount()>0 and Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0 and Duel.SelectYesNo(1-tp,aux.Stringid(24400012,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:Select(1-tp,1,1,nil)
Duel.SSet(1-tp,sg:GetFirst())
end
end
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetValue(c24400012.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c24400012.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c24400012.splimit(e,c)
return not c.named_with_TeZhanRenXing and not c.named_with_ZhanShuRenXing
end
function c24400012.aclimit(e,re,tp)
return re:GetHandler():IsType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
--快速修复
function c24400013.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400013,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c24400013.actg)
e1:SetOperation(c24400013.acop)
c:RegisterEffect(e1)
end
c24400013.named_with_ZhanShuRenXing=true
function c24400013.syfil(c)
return c:IsType(TYPE_SYNCHRO) and Duel.IsExistingMatchingCard(c24400013.thfil,tp,LOCATION_GRAVE,0,1,nil,c)
end
function c24400013.thfil(c,ec)
return bit.band(c:GetReason(),0x80008)==0x80008 and c:GetReasonCard()==ec and ec:GetMaterial():IsContains(c)
end
function c24400013.actg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c24400013.syfil,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end
Duel.SelectTarget(tp,c24400013.syfil,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c24400013.acop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.IsExistingMatchingCard(c24400013.thfil,tp,LOCATION_GRAVE,0,1,nil,tc) then
local g=Duel.SelectMatchingCard(tp,c24400013.thfil,tp,LOCATION_GRAVE,0,1,1,nil,tc)
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if tc:IsAbleToExtra() and Duel.SelectYesNo(tp,aux.Stringid(24400013,0)) then
Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)
end
end
end
--伞病毒
function c24400014.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,24400014+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c24400014.xxcost)
e1:SetTarget(c24400014.target)
e1:SetOperation(c24400014.activate)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(24400014,ACTIVITY_ATTACK,c24400014.counterfilter)
end
function c24400014.counterfilter(c)
return c.named_with_TeZhanRenXing or c:IsCode(24400039)
end
function c24400014.xxcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(24400014,tp,ACTIVITY_ATTACK)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OATH)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c24400014.atktg)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c24400014.atktg(e,c)
return not c.named_with_TeZhanRenXing and not c:IsCode(24400039)
end
function c24400014.xckfil(c)
return c:IsFaceup() and (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400014.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(c24400014.xckfil,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c24400014.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
local dg=g:Select(tp,1,3,REASON_EFFECT)
Duel.Destroy(dg,REASON_EFFECT)
end
end
--闪光弹
function c24400015.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c24400015.condition)
e1:SetOperation(c24400015.activate)
c:RegisterEffect(e1)
end
c24400015.named_with_ZhanShuRenXing=true
function c24400015.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c24400015.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1)
Duel.SkipPhase(1-tp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
end
--少女备战
function c24400016.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400016,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(c24400016.target)
e1:SetOperation(c24400016.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400016,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c24400016.sptg)
e2:SetOperation(c24400016.spop)
c:RegisterEffect(e2)
end
c24400016.named_with_ZhanShuRenXing=true
function c24400016.cfilter(c)
return c:IsFaceup() and c.named_with_ZhanShuRenXing and c:IsAbleToHand()
end
function c24400016.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c24400016.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g1=Duel.SelectTarget(tp,c24400016.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g2=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,g1:GetCount(),0,0)
end
function c24400016.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
end
function c24400016.spfilter(c,e,tp)
return c.named_with_ZhanShuRenXing and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c24400016.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c24400016.spfilter,tp,LOCATION_HAND,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c24400016.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,aux.NecroValleyFilter(c24400016.spfilter),tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
--深層映射
function c24400017.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c24400017.spcon)
e1:SetTarget(c24400017.sptg)
e1:SetOperation(c24400017.spop)
c:RegisterEffect(e1)
--leave
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(24400017,0))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetCondition(c24400017.atkcon)
e5:SetOperation(c24400017.atkop)
c:RegisterEffect(e5)
end
c24400017.named_with_ZhanShuRenXing=true
function c24400017.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
end
function c24400017.spfilter(c,e,tp)
return c.named_with_TeZhanRenXing and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c24400017.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400017.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c24400017.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c24400017.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local tc=g:GetFirst()
c:CancelToGrave()
Duel.Equip(tp,c,tc)
--Add Equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c24400017.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
end
end
function c24400017.eqlimit(e,c)
return e:GetLabelObject()==c
end
function c24400017.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetFirstCardTarget()
if tc and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() then
e:SetLabelObject(tc)
tc:CreateEffectRelation(e)
return true
else return false end
end
function c24400017.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
tc:RegisterEffect(e2)
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
--特戰人形-G3
function c24400018.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--token
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400018,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,24400018)
e1:SetCost(c24400018.tkcost)
e1:SetTarget(c24400018.tktg)
e1:SetOperation(c24400018.tkop)
c:RegisterEffect(e1)
--to garve
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400018,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,13100018)
e2:SetCost(c24400018.tgcost)
e2:SetTarget(c24400018.tgtg)
e2:SetOperation(c24400018.tgop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c24400018.atkval)
c:RegisterEffect(e3)
end
c24400018.named_with_TeZhanRenXing=true
function c24400018.tkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(tp,2)
if chk==0 then return g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEDOWN)==2
and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=2 end
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end
function c24400018.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,24400046,0,TYPES_TOKEN_MONSTER,0,1000,1,RACE_MACHINE,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c24400018.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,24400046,0,TYPES_TOKEN_MONSTER,0,1000,1,RACE_MACHINE,ATTRIBUTE_EARTH) then return end
local token=Duel.CreateToken(tp,24400046)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
function c24400018.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c24400018.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,1-tp,LOCATION_ONFIELD)
end
function c24400018.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>=2 then
local sg=g:RandomSelect(tp,2)
Duel.SendtoGrave(sg,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
end
function c24400018.ckfil(c)
return c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing
end
function c24400018.atkval(e)
local tp=e:GetHandlerPlayer()
return Duel.GetMatchingGroup(c24400018.ckfil,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetCount()*500
end
--特戰人形-G11
function c24400019.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--summon success
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(c24400019.sumsuc)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400019,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,24400019)
e2:SetCondition(c24400019.regcon)
e2:SetCost(c24400019.regcost)
e2:SetOperation(c24400019.regop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c24400019.atkval)
c:RegisterEffect(e3)
end
c24400019.named_with_TeZhanRenXing=true
function c24400019.sumsuc(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) then return end
Duel.SetChainLimitTillChainEnd(aux.FALSE)
end
function c24400019.regcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0
end
function c24400019.rctfil(c)
return (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing) and c:IsAbleToRemoveAsCost()
end
function c24400019.regcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400019.rctfil,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
local g=Duel.SelectMatchingCard(tp,c24400019.rctfil,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c24400019.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetLabel(Duel.GetTurnCount())
e1:SetLabelObject(e:GetHandler())
e1:SetCondition(c24400019.spcon)
e1:SetOperation(c24400019.spop)
if Duel.GetCurrentPhase()<=PHASE_STANDBY then
e1:SetReset(RESET_PHASE+PHASE_STANDBY,2)
else
e1:SetReset(RESET_PHASE+PHASE_STANDBY)
end
Duel.RegisterEffect(e1,tp)
end
function c24400019.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c24400019.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_CARD,0,24400019)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c24400019.ckfil(c)
return c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing
end
function c24400019.atkval(e)
local tp=e:GetHandlerPlayer()
return Duel.GetMatchingGroup(c24400019.ckfil,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetCount()*300
end
--特戰人形-HK416
function c24400020.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--special summon rule
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_HAND)
e0:SetCondition(c24400020.spcon)
e0:SetOperation(c24400020.spop)
c:RegisterEffect(e0)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--token
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400020,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,24400020)
e1:SetCost(c24400020.tkcost)
e1:SetTarget(c24400020.tktg)
e1:SetOperation(c24400020.tkop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400020,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,13100020)
e2:SetTarget(c24400020.thtg)
e2:SetOperation(c24400020.thop)
c:RegisterEffect(e2)
end
c24400020.named_with_TeZhanRenXing=true
function c24400020.spfilter1(c,tp)
return c:IsFaceup() and c:IsCode(24400035) and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c24400020.spfilter2,tp,LOCATION_MZONE,0,1,c)
end
function c24400020.spfilter2(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAbleToGraveAsCost()
end
function c24400020.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
and Duel.IsExistingMatchingCard(c24400020.spfilter1,tp,LOCATION_MZONE,0,1,nil,tp)
end
function c24400020.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c24400020.spfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,c24400020.spfilter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst())
g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_COST)
end
function c24400020.tkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(tp,2)
if chk==0 then return g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEDOWN)==2
and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=2 end
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end
function c24400020.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,24400046,0,TYPES_TOKEN_MONSTER,0,1000,1,RACE_MACHINE,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c24400020.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,24400046,0,TYPES_TOKEN_MONSTER,0,1000,1,RACE_MACHINE,ATTRIBUTE_EARTH) then return end
local token=Duel.CreateToken(tp,24400046)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
function c24400020.thfilter(c)
return c.named_with_ZhanShuRenXing and c:IsAbleToHand()
end
function c24400020.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400020.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c24400020.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c24400020.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
--特戰人形-M4A1
function c24400021.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400018,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,24400021)
e1:SetTarget(c24400021.tktg)
e1:SetOperation(c24400021.tkop)
c:RegisterEffect(e1)
--skip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400021,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BE_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,13100021)
e2:SetCondition(c24400021.condition)
e2:SetOperation(c24400021.operation)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c24400021.atkval)
c:RegisterEffect(e3)
end
c24400021.named_with_TeZhanRenXing=true
function c24400021.ckfil(c)
return c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing
end
function c24400021.atkval(e)
local tp=e:GetHandlerPlayer()
return Duel.GetMatchingGroup(c24400021.ckfil,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetCount()*400
end
function c24400021.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,24400046,0,TYPES_TOKEN_MONSTER,0,1000,1,RACE_MACHINE,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c24400021.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,24400046,0,TYPES_TOKEN_MONSTER,0,1000,1,RACE_MACHINE,ATTRIBUTE_EARTH) then return end
local token=Duel.CreateToken(tp,24400046)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
function c24400021.condition(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
return d==e:GetHandler()
end
function c24400021.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateAttack()
end
--特戰人形-RF之花
function c24400022.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,99,c24400022.lcheck)
c:EnableReviveLimit()
--xx
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,24400022)
e1:SetCost(c24400022.xxcost)
e1:SetTarget(c24400022.xxtg)
e1:SetOperation(c24400022.xxop)
c:RegisterEffect(e1)
end
c24400022.named_with_TeZhanRenXing=true
function c24400022.mckfil(c)
return c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing
end
function c24400022.lcheck(g)
return g:IsExists(c24400022.mckfil,1,nil)
end
function c24400022.ctfil(c)
return c.named_with_ZhanShuRenXing and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c24400022.xxcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400022.ctfil,tp,LOCATION_DECK,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c24400022.ctfil,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c24400022.xxtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(1-tp,1)
if chk==0 then return g:GetCount()==g:FilterCount(Card.IsAbleToRemove,nil,POS_FACEDOWN) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c24400022.xxop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetDecktopGroup(1-tp,1)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end
function c24400022.actfilter(e,c)
return c:IsType(TYPE_MONSTER) and not c:IsAttribute(ATTRIBUTE_EARTH)
end
function c24400022.atktg(e,c)
return not c:IsAttribute(ATTRIBUTE_EARTH)
end
--特戰人形-RO635
function c24400023.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--defense attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DEFENSE_ATTACK)
e1:SetValue(1)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c24400023.atkcon)
e2:SetTarget(c24400023.atktg)
e2:SetOperation(c24400023.atkop)
c:RegisterEffect(e2)
--coin
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(24400023,0))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLED)
e3:SetTarget(c24400023.cointg)
e3:SetOperation(c24400023.coinop)
c:RegisterEffect(e3)
--atk
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_UPDATE_DEFENSE)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(c24400023.atkval)
c:RegisterEffect(e4)
end
c24400023.named_with_TeZhanRenXing=true
c24400023.toss_coin=true
function c24400023.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c24400023.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end
Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
end
function c24400023.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-500)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(300)
c:RegisterEffect(e2)
end
end
function c24400023.ckfil(c)
return c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing
end
function c24400023.atkval(e)
local tp=e:GetHandlerPlayer()
return Duel.GetMatchingGroup(c24400023.ckfil,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetCount()*300
end
function c24400023.cointg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1)
end
function c24400023.coinop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local res=Duel.TossCoin(tp,1)
if res==0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-300)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
else
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(300)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
--特戰人形-SOPMODII
function c24400024.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1,1)
c:EnableReviveLimit()
--synchro summon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400024,0))
e1:SetCategory(CATEGORY_DRAW+CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c24400024.drcon)
e1:SetTarget(c24400024.drtarg)
e1:SetOperation(c24400024.drop)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400024,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHANGE_POS)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c24400024.adcon)
e2:SetOperation(c24400024.adop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c24400024.atkval)
c:RegisterEffect(e3)
end
c24400024.named_with_TeZhanRenXing=true
function c24400024.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c24400024.drtarg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c24400024.posfil(c)
return c:IsFaceup() and c:IsCanChangePosition()
end
function c24400024.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
local mg=c:GetMaterial()
if mg:GetCount()>0 and Duel.IsExistingMatchingCard(c24400024.posfil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(24400024,0)) then
local g=Duel.SelectMatchingCard(tp,c24400024.posfil,tp,LOCATION_MZONE,LOCATION_MZONE,1,mg:GetCount(),nil)
Duel.HintSelection(g)
Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
end
function c24400024.adcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsControler,1,nil,tp)
end
function c24400024.adop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_CARD,0,24400024)
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(-500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function c24400024.ckfil(c)
return c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing
end
function c24400024.atkval(e)
local tp=e:GetHandlerPlayer()
return Duel.GetMatchingGroup(c24400024.ckfil,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetCount()*300
end
--特戰人形-UMP9
function c24400025.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,24400041,aux.FilterBoolFunction(Card.IsLevel,1),1,true,true)
aux.AddContactFusionProcedure(c,Card.IsReleasable,LOCATION_MZONE,0,Duel.Release,REASON_COST+REASON_MATERIAL)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c24400025.splimit)
c:RegisterEffect(e1)
--move
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400025,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c24400025.seqtg)
e1:SetOperation(c24400025.seqop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400025,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e2:SetCountLimit(1)
e2:SetCost(c24400025.xxcost)
e2:SetTarget(c24400025.xxtg)
e2:SetOperation(c24400025.xxop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(24400025,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,24400025)
e3:SetTarget(c24400025.sptg)
e3:SetOperation(c24400025.spop)
c:RegisterEffect(e3)
end
c24400025.named_with_TeZhanRenXing=true
function c24400025.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c24400025.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
end
function c24400025.seqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) or not c:IsControler(tp) or Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local fd=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
Duel.Hint(HINT_ZONE,tp,fd)
local seq=math.log(fd,2)
local pseq=c:GetSequence()
Duel.MoveSequence(c,seq)
end
function c24400025.xxcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c24400025.xxtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local cg=c:GetColumnGroup()
if chk==0 then return cg:IsExists(Card.IsLocation,1,nil,LOCATION_MZONE) end
end
function c24400025.xxop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cg=c:GetColumnGroup()
local g=cg:Filter(Card.IsLocation,nil,LOCATION_MZONE)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400025,1))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_TRIGGER)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
function c24400025.spfil(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c.named_with_TeZhanRenXing and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c24400025.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetColumnGroupCount()>0 and Duel.IsExistingMatchingCard(c24400025.spfil,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c24400025.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c24400025.spfil,tp,LOCATION_EXTRA,0,nil,e,tp)
if g:GetCount()>0 then
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_SKIP_DP)
e1:SetTargetRange(1,0)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_DRAW then
e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN,2)
else
e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN)
end
Duel.RegisterEffect(e1,tp)
end
--特戰人形-UMP45
function c24400026.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,c24400026.fmfil1,aux.FilterBoolFunction(Card.IsType,TYPE_EFFECT),true)
aux.AddContactFusionProcedure(c,Card.IsReleasable,LOCATION_MZONE,0,Duel.Release,REASON_COST+REASON_MATERIAL)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c24400026.splimit)
c:RegisterEffect(e1)
--move
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400026,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c24400026.seqtg)
e1:SetOperation(c24400026.seqop)
c:RegisterEffect(e1)
--negate attack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400026,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BE_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c24400026.cost)
e2:SetCondition(c24400026.condition)
e2:SetOperation(c24400026.operation)
c:RegisterEffect(e2)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400026,2))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,24400026)
e2:SetTarget(c24400026.settg)
e2:SetOperation(c24400026.setop)
c:RegisterEffect(e2)
end
c24400026.named_with_TeZhanRenXing=true
c24400026.named_with_Xump45=true
function c24400026.fmfil1(c)
return c.named_with_ZhanShuRenXing
end
function c24400026.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c24400026.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
end
function c24400026.seqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) or not c:IsControler(tp) or Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local fd=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
Duel.Hint(HINT_ZONE,tp,fd)
local seq=math.log(fd,2)
local pseq=c:GetSequence()
Duel.MoveSequence(c,seq)
end
function c24400026.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c24400026.condition(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
return d==e:GetHandler()
end
function c24400026.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
end
function c24400026.setfilter(c)
return c.named_with_ZhanShuRenXing and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function c24400026.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetColumnGroupCount()>0 and Duel.IsExistingMatchingCard(c24400026.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c24400026.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c24400026.setfilter,tp,LOCATION_DECK,0,1,1,nil,false)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
end
end
--特戰人形-春田M1903
function c24400027.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),4,2,c24400027.ovfilter,aux.Stringid(24400027,0),2,c24400027.xyzop)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400027,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c24400027.rkcon)
e1:SetCost(c24400027.rkcost)
e1:SetOperation(c24400027.rkop)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400027,3))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1,24400027)
e2:SetTarget(c24400027.tptg)
e2:SetOperation(c24400027.tpop)
c:RegisterEffect(e2)
--atkup
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c24400027.atkval)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(24400027,1))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCost(c24400027.descost)
e4:SetTarget(c24400027.destg)
e4:SetOperation(c24400027.desop)
c:RegisterEffect(e4)
--atk
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(24400027,2))
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCost(c24400027.atkcost)
e5:SetTarget(c24400027.atktg)
e5:SetOperation(c24400027.atkop)
c:RegisterEffect(e5)
end
c24400027.named_with_TeZhanRenXing=true
function c24400027.ovfilter(c)
return c:IsFaceup() and c.named_with_TeZhanRenXing
end
function c24400027.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,24400027)==0 end
Duel.RegisterFlagEffect(tp,24400027,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c24400027.ovfil(c)
return (c.named_with_ZhanShuRenXing or c:IsRace(RACE_MACHINE)) and c:IsType(TYPE_MONSTER)
end
function c24400027.tptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c24400027.ovfil,tp,LOCATION_DECK,0,1,nil) end
end
function c24400027.tpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c24400027.ovfil,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Overlay(c,g)
end
end
function c24400027.rkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c24400027.rkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c24400027.rkop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,1,nil)
if tg==nil then return end
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
local tc=tg:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_REMOVED)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
e1:SetCondition(c24400027.thcon)
e1:SetOperation(c24400027.thop)
e1:SetLabel(0)
tc:RegisterEffect(e1)
tc=tg:GetNext()
end
end
function c24400027.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c24400027.thop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
e:GetHandler():SetTurnCounter(ct+1)
if ct==0 then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,e:GetHandler())
else e:SetLabel(1) end
end
function c24400027.atkval(e,c)
return c:GetOverlayCount()*400
end
function c24400027.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetOverlayCount()>=3 and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c24400027.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c24400027.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400027.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c24400027.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c24400027.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c24400027.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function c24400027.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetOverlayCount()>=5 and e:GetHandler():CheckRemoveOverlayCard(tp,e:GetHandler():GetOverlayCount(),REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,e:GetHandler():GetOverlayCount(),e:GetHandler():GetOverlayCount(),REASON_COST)
end
function c24400027.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c24400027.atkop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(5000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
--特戰人形-卡爾卡諾M91_38
function c24400028.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),4,2,c24400028.ovfilter,aux.Stringid(24400028,0),2,c24400028.xyzop)
c:EnableReviveLimit()
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400028,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1,24400028)
e2:SetTarget(c24400028.tptg)
e2:SetOperation(c24400028.tpop)
c:RegisterEffect(e2)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1500)
e1:SetLabel(2)
e1:SetCondition(c24400028.xxcon)
c:RegisterEffect(e1)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
e3:SetLabel(3)
e3:SetCondition(c24400028.xxcon)
c:RegisterEffect(e3)
--ov
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400028,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetLabel(5)
e2:SetCondition(c24400028.xxcon)
e2:SetTarget(c24400028.mattg)
e2:SetOperation(c24400028.matop)
c:RegisterEffect(e2)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetLabel(6)
e1:SetCondition(c24400028.xxcon)
e1:SetValue(c24400028.efilter)
c:RegisterEffect(e1)
--disable spsummon
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EFFECT_CANNOT_SUMMON)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetTargetRange(0,1)
e6:SetCondition(c24400028.xxcon)
e6:SetLabel(13)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
c:RegisterEffect(e7)
end
c24400028.named_with_TeZhanRenXing=true
function c24400028.ovfilter(c)
return c:IsFaceup() and c.named_with_TeZhanRenXing
end
function c24400028.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,24400028)==0 end
Duel.RegisterFlagEffect(tp,24400028,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c24400028.ovfil(c)
return (c.named_with_ZhanShuRenXing or c:IsRace(RACE_MACHINE)) and c:IsType(TYPE_MONSTER)
end
function c24400028.tptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c24400028.ovfil,tp,LOCATION_DECK,0,1,nil) end
end
function c24400028.tpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c24400028.ovfil,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Overlay(c,g)
end
end
function c24400028.xxcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayCount()>=e:GetLabel()
end
function c24400028.mattg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0)>0 end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c24400028.matop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetDecktopGroup(1-tp,1)
if c:IsRelateToEffect(e) and g:GetCount()==1 then
Duel.DisableShuffleCheck()
Duel.Overlay(c,g)
end
end
function c24400028.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c24400028.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetOverlayCount()>=5 and e:GetHandler():CheckRemoveOverlayCard(tp,e:GetHandler():GetOverlayCount(),REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,e:GetHandler():GetOverlayCount(),e:GetHandler():GetOverlayCount(),REASON_COST)
end
function c24400028.atkop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
Duel.Win(tp,0x1)
end
--特戰人形-卡爾卡諾M1891
function c24400029.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),4,2,c24400029.ovfilter,aux.Stringid(24400029,0),2,c24400029.xyzop)
c:EnableReviveLimit()
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400029,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1,24400029)
e2:SetTarget(c24400029.tptg)
e2:SetOperation(c24400029.tpop)
c:RegisterEffect(e2)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1300)
e1:SetLabel(2)
e1:SetCondition(c24400029.xxcon)
c:RegisterEffect(e1)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetLabel(3)
e1:SetCondition(c24400029.xxcon)
e1:SetValue(1)
c:RegisterEffect(e1)
--ov
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400029,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetLabel(5)
e2:SetCondition(c24400029.xxcon)
e2:SetTarget(c24400029.mattg)
e2:SetOperation(c24400029.matop)
c:RegisterEffect(e2)
--
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_REMOVE)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetLabel(10)
e5:SetCondition(c24400029.xxcon)
e5:SetCost(c24400029.atkcost)
e5:SetTarget(c24400029.atktg)
e5:SetOperation(c24400029.atkop)
c:RegisterEffect(e5)
--disable spsummon
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EFFECT_CANNOT_SUMMON)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetTargetRange(0,1)
e6:SetCondition(c24400029.xxcon)
e6:SetLabel(13)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
c:RegisterEffect(e7)
end
c24400029.named_with_TeZhanRenXing=true
function c24400029.ovfilter(c)
return c:IsFaceup() and c.named_with_TeZhanRenXing
end
function c24400029.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,24400029)==0 end
Duel.RegisterFlagEffect(tp,24400029,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c24400029.ovfil(c)
return (c.named_with_ZhanShuRenXing or c:IsRace(RACE_MACHINE)) and c:IsType(TYPE_MONSTER)
end
function c24400029.tptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c24400029.ovfil,tp,LOCATION_DECK,0,1,nil) end
end
function c24400029.tpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c24400029.ovfil,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Overlay(c,g)
end
end
function c24400029.xxcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayCount()>=e:GetLabel()
end
function c24400029.mattg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0)>0 end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c24400029.matop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetDecktopGroup(1-tp,1)
if c:IsRelateToEffect(e) and g:GetCount()==1 then
Duel.DisableShuffleCheck()
Duel.Overlay(c,g)
end
end
function c24400029.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetOverlayCount()>=5 and e:GetHandler():CheckRemoveOverlayCard(tp,e:GetHandler():GetOverlayCount(),REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,e:GetHandler():GetOverlayCount(),e:GetHandler():GetOverlayCount(),REASON_COST)
end
function c24400029.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_DECK,7,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,7,1-tp,LOCATION_DECK)
end
function c24400029.atkop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_DECK,nil)
if g:GetCount()>=7 then
local dg=g:Select(1-tp,7,7,nil)
Duel.Remove(dg,POS_FACEDOWN,REASON_EFFECT)
end
end
--战术人形-SOPMODII
function c24400031.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,24400031+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c24400031.spcon)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400031,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHANGE_POS)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c24400031.adcon)
e2:SetOperation(c24400031.adop)
c:RegisterEffect(e2)
--position
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400031,1))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,13100031)
e2:SetTarget(c24400031.postg)
e2:SetOperation(c24400031.posop)
c:RegisterEffect(e2)
e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c24400031.atkval)
c:RegisterEffect(e3)
end
c24400031.named_with_ZhanShuRenXing=true
function c24400031.filter(c)
return c:IsFaceup() and (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400031.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(c24400031.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c24400031.adcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsControler,1,nil,tp)
end
function c24400031.adop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_CARD,0,24400031)
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(-300)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function c24400031.ckfil(c)
return c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing
end
function c24400031.atkval(e)
local tp=e:GetHandlerPlayer()
return Duel.GetMatchingGroup(c24400031.ckfil,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetCount()*100
end
function c24400031.posfilter(c)
return c:IsFaceup() and c:IsCanChangePosition()
end
function c24400031.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400031.posfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,tp,LOCATION_MZONE)
end
function c24400031.posop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,c24400031.posfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.HintSelection(g)
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
end
--战术人形-UMP45
function c24400032.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c24400032.fmfil,2,true)
aux.AddContactFusionProcedure(c,Card.IsReleasable,LOCATION_MZONE,0,Duel.Release,REASON_COST+REASON_MATERIAL)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c24400032.splimit)
c:RegisterEffect(e1)
--move
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400032,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c24400032.seqtg)
e1:SetOperation(c24400032.seqop)
c:RegisterEffect(e1)
--skip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400032,1))
e2:SetCategory(CATEGORY_COIN)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BE_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,24400032)
e2:SetCondition(c24400032.condition)
e2:SetTarget(c24400032.target)
e2:SetOperation(c24400032.operation)
c:RegisterEffect(e2)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400032,2))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,24400032)
e2:SetTarget(c24400032.settg)
e2:SetOperation(c24400032.setop)
c:RegisterEffect(e2)
end
c24400032.named_with_ZhanShuRenXing=true
c24400032.named_with_Xump45=true
c24400032.toss_coin=true
function c24400032.fmfil(c)
return c.named_with_ZhanShuRenXing
end
function c24400032.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c24400032.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
end
function c24400032.seqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) or not c:IsControler(tp) or Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local fd=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
Duel.Hint(HINT_ZONE,tp,fd)
local seq=math.log(fd,2)
local pseq=c:GetSequence()
Duel.MoveSequence(c,seq)
end
function c24400032.condition(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
return d==e:GetHandler()
end
function c24400032.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,0)
end
function c24400032.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local a=Duel.TossCoin(tp,1)
if a==1 then
Duel.NegateAttack()
end
end
function c24400032.setfilter(c)
return c.named_with_ZhanShuRenXing and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function c24400032.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetColumnGroupCount()>0 and Duel.IsExistingMatchingCard(c24400032.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c24400032.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c24400032.setfilter,tp,LOCATION_DECK,0,1,1,nil,false)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
end
end
--戰術人形-G3
function c24400033.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(1,24400033)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c24400033.spcon)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400033,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,24400133)
e2:SetTarget(c24400033.sptg)
e2:SetOperation(c24400033.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--atklimit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_ATTACK)
e4:SetCondition(c24400033.atkcon)
c:RegisterEffect(e4)
--atk
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(c24400033.atkval)
c:RegisterEffect(e5)
end
c24400033.named_with_ZhanShuRenXing=true
function c24400033.spcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c24400033.spfilter(c,e,tp)
return c.named_with_ZhanShuRenXing and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c24400033.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c24400033.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c24400033.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,c24400033.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c24400033.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c24400033.splimit(e,c)
return not (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400033.cfilter(c)
return c:IsFaceup() and c.named_with_ZhanShuRenXing
end
function c24400033.atkcon(e)
return not Duel.IsExistingMatchingCard(c24400033.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler())
end
function c24400033.ckfil(c)
return c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing
end
function c24400033.atkval(e)
local tp=e:GetHandlerPlayer()
return Duel.GetMatchingGroup(c24400033.ckfil,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetCount()*200
end
\ No newline at end of file
--戰術人形-G11
function c24400034.initial_effect(c)
--direct attack
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(24400034,2))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(c24400034.dacost)
e3:SetOperation(c24400034.daop)
c:RegisterEffect(e3)
--atklimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_ATTACK)
e2:SetCondition(c24400034.atkcon)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(24400034,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,24400034)
e3:SetTarget(c24400034.sptg)
e3:SetOperation(c24400034.spop)
c:RegisterEffect(e3)
end
c24400034.named_with_ZhanShuRenXing=true
function c24400034.cfilter(c)
return c:IsFaceup() and c.named_with_ZhanShuRenXing
end
function c24400034.atkcon(e)
return not Duel.IsExistingMatchingCard(c24400034.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler())
end
function c24400034.dacost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c24400034.daop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e)
and Duel.IsExistingMatchingCard(c24400034.dafilter,tp,0,LOCATION_MZONE,1,nil,c:GetAttack()) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function c24400034.spfilter(c,e,tp)
return c:IsCode(24400035) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c24400034.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c24400034.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK)
end
function c24400034.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,c24400034.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--戰術人形-HK416
function c24400035.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400035,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,24400035)
e1:SetTarget(c24400035.thtg)
e1:SetOperation(c24400035.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--extra summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(24400035,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_CHANGE_POS)
e3:SetCountLimit(2,24400135)
e3:SetCondition(c24400035.smcon)
e3:SetTarget(c24400035.smtg)
e3:SetOperation(c24400035.smop)
c:RegisterEffect(e3)
end
c24400035.named_with_ZhanShuRenXing=true
function c24400035.thfilter(c)
return c.named_with_ZhanShuRenXing and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c24400035.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400035.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c24400035.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c24400035.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 c24400035.smcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_CONTINUOUS_POS) and c:IsPosition(POS_FACEUP_DEFENSE) and c:IsPreviousPosition(POS_FACEUP_ATTACK)
end
function c24400035.smtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local ct=0
local ce={Duel.IsPlayerAffectedByEffect(tp,EFFECT_SET_SUMMON_COUNT_LIMIT)}
for _,te in ipairs(ce) do
ct=math.max(ct,te:GetValue())
end
return ct<2
end
end
function c24400035.ckfilter(c)
return c.named_with_ZhanShuRenXing
end
function c24400035.smop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(24400035,2))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(c24400035.ckfilter))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
--戰術人形-M4A1
function c24400036.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400036,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,24400036)
e1:SetTarget(c24400036.thtg)
e1:SetOperation(c24400036.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--send to grave
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(24400035,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_CHANGE_POS)
e3:SetCountLimit(1,13100036)
e3:SetCondition(c24400036.smcon)
e3:SetTarget(c24400036.target)
e3:SetOperation(c24400036.operation)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(24400021,2))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BE_BATTLE_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c24400036.pocon)
e4:SetTarget(c24400036.potg)
e4:SetOperation(c24400036.poop)
c:RegisterEffect(e4)
--atk
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(c24400036.atkval)
c:RegisterEffect(e5)
end
c24400036.named_with_ZhanShuRenXing=true
function c24400036.thfilter(c)
return c:IsCode(24400003) and c:IsAbleToHand()
end
function c24400036.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400036.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c24400036.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c24400036.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 c24400036.tgfilter(c)
return c.named_with_ZhanShuRenXing and c:IsAbleToGrave()
end
function c24400036.smcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_CONTINUOUS_POS) and c:IsPosition(POS_FACEUP_DEFENSE) and c:IsPreviousPosition(POS_FACEUP_ATTACK)
end
function c24400036.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400036.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c24400036.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c24400036.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c24400036.pocon(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
return d==e:GetHandler()
end
function c24400036.potg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():IsAttackPos() end
Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0)
end
function c24400036.poop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsAttackPos() and c:IsRelateToEffect(e) then
Duel.ChangePosition(c,POS_FACEUP_DEFENSE)
end
end
function c24400036.ckfil(c)
return c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing
end
function c24400036.atkval(e)
local tp=e:GetHandlerPlayer()
return Duel.GetMatchingGroup(c24400036.ckfil,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetCount()*200
end
--戰術人形-M4A1-ACE
function c24400037.initial_effect(c)
c:EnableReviveLimit()
--special summon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c24400037.sprcon)
e2:SetTarget(c24400037.sprtg)
e2:SetOperation(c24400037.sprop)
c:RegisterEffect(e2)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
c:RegisterEffect(e1)
--destroy all
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(24400037,1))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetTarget(c24400037.destg)
e4:SetOperation(c24400037.desop)
c:RegisterEffect(e4)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c24400037.atkval)
c:RegisterEffect(e3)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400037,1))
e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(2,24400037)
e2:SetCondition(c24400037.discon)
e2:SetCost(c24400037.discost)
e2:SetTarget(c24400037.distg)
e2:SetOperation(c24400037.disop)
c:RegisterEffect(e2)
end
c24400037.named_with_ZhanShuRenXing=true
function c24400037.ctfil(c)
return c.named_with_TeZhanRenXing and c:IsAbleToGraveAsCost()
end
function c24400037.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local rg=Duel.GetMatchingGroup(c24400037.ctfil,tp,LOCATION_MZONE,0,nil)
return rg:CheckSubGroup(aux.mzctcheckrel,3,3,tp)
end
function c24400037.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local rg=Duel.GetMatchingGroup(c24400037.ctfil,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=rg:SelectSubGroup(tp,aux.mzctcheckrel,true,3,3,tp)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c24400037.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_COST)
g:DeleteGroup()
Duel.Hint(HINT_MUSIC,0,aux.Stringid(24400037,2))
Duel.Hint(HINT_MESSAGE,tp,aux.Stringid(24400037,1))
end
function c24400037.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c24400037.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function c24400037.ckfil(c)
return c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing
end
function c24400037.atkval(e)
local tp=e:GetHandlerPlayer()
return Duel.GetMatchingGroup(c24400037.ckfil,tp,LOCATION_GRAVE,0,nil):GetCount()*800
end
function c24400037.discon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()~=e:GetHandler() and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c24400037.dctfil(c)
return (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing) and c:IsAbleToRemoveAsCost()
end
function c24400037.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400037.dctfil,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c24400037.dctfil,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c24400037.distg(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 c24400037.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev) and c:IsRelateToEffect(e) then
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
--戰術人形-P30
function c24400038.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,24400038)
e1:SetCondition(c24400038.spcon)
e1:SetOperation(c24400038.spop)
c:RegisterEffect(e1)
--lvchange
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400038,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c24400038.lvtg)
e1:SetOperation(c24400038.lvop)
c:RegisterEffect(e1)
end
c24400038.named_with_ZhanShuRenXing=true
function c24400038.filter(c)
return c:IsFaceup() and (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400038.spcon(e,c)
local g=Duel.GetDecktopGroup(e:GetHandlerPlayer(),2)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(c24400038.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) and g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEDOWN)==2
end
function c24400038.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetDecktopGroup(tp,2)
Duel.Remove(g,POS_FACEDOWN_DEFENSE,REASON_COST)
end
function c24400038.lvfilter(c,lv)
return c:IsFaceup() and (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing) and not c:IsLevel(lv) and c:IsLevelAbove(1)
end
function c24400038.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c24400038.lvfilter(chkc,e:GetHandler():GetLevel()) end
if chk==0 then return Duel.IsExistingTarget(c24400038.lvfilter,tp,LOCATION_MZONE,0,1,nil,e:GetHandler():GetLevel()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c24400038.lvfilter,tp,LOCATION_MZONE,0,1,1,nil,e:GetHandler():GetLevel())
end
function c24400038.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(tc:GetLevel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
--戰術人形-RO635
function c24400039.initial_effect(c)
--defense attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DEFENSE_ATTACK)
e1:SetValue(1)
c:RegisterEffect(e1)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400039,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CHANGE_POS)
e1:SetCountLimit(1,24400039)
e1:SetCondition(c24400039.smcon)
e1:SetTarget(c24400039.target)
e1:SetOperation(c24400039.operation)
c:RegisterEffect(e1)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_DEFENSE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c24400039.atkval)
c:RegisterEffect(e3)
end
c24400039.named_with_ZhanShuRenXing=true
function c24400039.smcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_CONTINUOUS_POS) and c:IsPosition(POS_FACEUP_DEFENSE) and c:IsPreviousPosition(POS_FACEUP_ATTACK)
end
function c24400039.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
end
function c24400039.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function c24400039.ckfil(c)
return c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing
end
function c24400039.atkval(e)
local tp=e:GetHandlerPlayer()
return Duel.GetMatchingGroup(c24400039.ckfil,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetCount()*100
end
--戰術人形-TAR21
function c24400040.initial_effect(c)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400040,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,24400040)
e2:SetTarget(c24400040.thtg)
e2:SetOperation(c24400040.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--pos
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400035,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CHANGE_POS)
e1:SetCondition(c24400040.smcon)
e1:SetTarget(c24400040.target)
e1:SetOperation(c24400040.operation)
c:RegisterEffect(e1)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400040,0))
e1:SetCategory(CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCondition(c24400040.discon)
e1:SetTarget(c24400040.distg)
e1:SetOperation(c24400040.disop)
c:RegisterEffect(e1)
end
c24400040.named_with_ZhanShuRenXing=true
function c24400040.thfilter(c)
return c.named_with_ZhanShuRenXing and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c24400040.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400040.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c24400040.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c24400040.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 c24400040.smcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_CONTINUOUS_POS) and c:IsPosition(POS_FACEUP_DEFENSE) and c:IsPreviousPosition(POS_FACEUP_ATTACK)
end
function c24400040.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanChangePosition,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,1-tp,LOCATION_MZONE)
end
function c24400040.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsCanChangePosition,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
end
function c24400040.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
end
function c24400040.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(3)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
end
function c24400040.disop(e,tp,eg,ep,ev,re,r,rp)
local p,val=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.DiscardDeck(p,val,REASON_EFFECT)
end
--戰術人形-UMP9
function c24400041.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,24400041)
e1:SetCondition(c24400041.hspcon)
e1:SetValue(c24400041.hspval)
c:RegisterEffect(e1)
--move
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400041,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c24400041.seqtg)
e2:SetOperation(c24400041.seqop)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(24400041,0))
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCode(EVENT_CHAINING)
e3:SetCondition(c24400041.discon)
e3:SetTarget(c24400041.distg)
e3:SetOperation(c24400041.disop)
c:RegisterEffect(e3)
end
c24400041.named_with_ZhanShuRenXing=true
function c24400041.cfilter(c)
return c:GetColumnGroupCount()>0
end
function c24400041.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local zone=0
local lg=Duel.GetMatchingGroup(c24400041.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
for tc in aux.Next(lg) do
zone=bit.bor(zone,tc:GetColumnZone(LOCATION_MZONE,tp))
end
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function c24400041.hspval(e,c)
local tp=c:GetControler()
local zone=0
local lg=Duel.GetMatchingGroup(c24400041.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
for tc in aux.Next(lg) do
zone=bit.bor(zone,tc:GetColumnZone(LOCATION_MZONE,tp))
end
return 0,zone
end
function c24400041.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
end
function c24400041.seqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) or not c:IsControler(tp) or Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local fd=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
Duel.Hint(HINT_ZONE,tp,fd)
local seq=math.log(fd,2)
local pseq=c:GetSequence()
Duel.MoveSequence(c,seq)
end
function c24400041.discon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
if e:GetHandler():GetColumnGroup():GetCount()<1 then return false end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and tg:IsContains(e:GetHandler()) and rp==1-tp and Duel.IsChainNegatable(ev)
end
function c24400041.tgfilter(c)
return c.named_with_ZhanShuRenXing and c:IsAbleToGrave()
end
function c24400041.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400041.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c24400041.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c24400041.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.BreakEffect()
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
\ No newline at end of file
--戰術人形-UMP45
function c24400042.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400042,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,24400042)
e1:SetTarget(c24400042.sptg)
e1:SetOperation(c24400042.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--discard
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(24400042,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(c24400042.ddcost)
e3:SetTarget(c24400042.ddtg)
e3:SetOperation(c24400042.ddop)
c:RegisterEffect(e3)
--indes
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(24400042,2))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCost(c24400042.indcost)
e4:SetTarget(c24400042.indtg)
e4:SetOperation(c24400042.indop)
c:RegisterEffect(e4)
end
c24400042.named_with_ZhanShuRenXing=true
c24400042.named_with_Xump45=true
function c24400042.spfilter(c,e,tp)
return c:IsCode(24400041) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c24400042.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c24400042.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c24400042.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,c24400042.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c24400042.cfilter1(c,tp)
return c:IsCode(24400046)
end
function c24400042.ddcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,c24400042.cfilter1,1,nil,tp) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,c24400042.cfilter1,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c24400042.ddtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,0,LOCATION_HAND,1,nil,REASON_EFFECT) end
end
function c24400042.ddop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsDiscardable,tp,0,LOCATION_HAND,nil,REASON_EFFECT)
if g:GetCount()>0 then
local sg=g:RandomSelect(g,1-tp,1)
Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT)
end
end
function c24400042.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsDiscardable()
end
function c24400042.indcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400042.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,c24400042.costfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c24400042.indtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c24400042.indop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(24400042,2))
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
c:RegisterEffect(e2)
end
--戰術人形-阿斯特拉左輪
function c24400043.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,24400043)
e1:SetCondition(c24400043.spcon)
e1:SetOperation(c24400043.spop)
c:RegisterEffect(e1)
--lv change
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c24400043.lvtg)
e1:SetOperation(c24400043.lvop)
c:RegisterEffect(e1)
end
c24400043.named_with_ZhanShuRenXing=true
function c24400043.filter(c)
return c:IsFaceup() and (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400043.spcon(e,c)
local g=Duel.GetDecktopGroup(e:GetHandlerPlayer(),2)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(c24400043.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) and g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEDOWN)==2
end
function c24400043.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetDecktopGroup(tp,2)
Duel.Remove(g,POS_FACEDOWN_DEFENSE,REASON_COST)
end
function c24400043.filter(c)
return c:IsFaceup() and (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400043.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400043.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINGMSG_LVRANK)
e:SetLabel(Duel.AnnounceLevel(tp,2,8))
end
function c24400043.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(e:GetLabel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
--戰術人形-春田M1903
function c24400044.initial_effect(c)
--place
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400044,1))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetTarget(c24400044.target)
e1:SetOperation(c24400044.operation)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetTarget(c24400044.dstg)
e2:SetOperation(c24400044.dsop)
c:RegisterEffect(e2)
--atklimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_ATTACK)
c:RegisterEffect(e2)
end
c24400044.named_with_ZhanShuRenXing=true
function c24400044.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function c24400044.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
end
end
function c24400044.dsfil(c)
return c:GetAttack()<c:GetDefense()
end
function c24400044.dstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_SPELL) and e:GetHandler():IsType(TYPE_CONTINUOUS) and Duel.IsExistingMatchingCard(c24400044.dsfil,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c24400044.dsfil,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),1-tp,LOCATION_MZONE)
end
function c24400044.dsop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c24400044.dsfil,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
--支援梯队
function c24400045.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400045,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c24400045.target)
e1:SetOperation(c24400045.activate)
c:RegisterEffect(e1)
end
c24400045.named_with_ZhanShuRenXing=true
function c24400045.filter(c,e,tp)
return c.named_with_ZhanShuRenXing and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c24400045.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c24400045.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c24400045.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c24400045.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--天才技师德尔
function c24400047.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400047,4))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400047,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,24400047)
e1:SetTarget(c24400047.sptg)
e1:SetOperation(c24400047.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400047,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,24400047)
e2:SetTarget(c24400047.thtg)
e2:SetOperation(c24400047.thop)
c:RegisterEffect(e2)
--set
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(24400047,2))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE+LOCATION_HAND+LOCATION_GRAVE)
e4:SetCountLimit(1,69522668)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c24400047.settg)
e4:SetOperation(c24400047.setop)
c:RegisterEffect(e4)
end
c24400047.named_with_ZhanShuRenXing=true
function c24400047.spfilter(c,e,tp)
return (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:IsType(TYPE_MONSTER)
end
function c24400047.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c24400047.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c24400047.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,c24400047.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
end
function c24400047.thfil(c)
return c:IsAbleToHand() and c:IsType(TYPE_MONSTER) and c.named_with_ZhanShuRenXing
end
function c24400047.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c24400047.thfil,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c24400047.ckfil(c)
return (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing) and c:IsType(TYPE_MONSTER)
end
function c24400047.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c24400047.thfil,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 then
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
if Duel.IsExistingMatchingCard(c24400047.ckfil,tp,LOCATION_GRAVE,0,1,nil) and sg:GetFirst():IsAbleToGrave() and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(24400047,3)) then
Duel.SendtoGrave(sg,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function c24400047.setfilter(c)
return c.named_with_ZhanShuRenXing and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() and not c:IsType(TYPE_FIELD)
end
function c24400047.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400047.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c24400047.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c24400047.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
end
end
--逆向坍塌
function c24400048.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400048,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,24400048)
e1:SetCost(c24400048.cost)
e1:SetTarget(c24400048.thtg)
e1:SetOperation(c24400048.thop)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400048,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,13100048)
e2:SetCost(c24400048.cost)
e2:SetTarget(c24400048.atktg)
e2:SetOperation(c24400048.atkop)
c:RegisterEffect(e2)
end
c24400048.named_with_ZhanShuRenXing=true
function c24400048.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c24400048.thfil(c)
return c.named_with_ZhanShuRenXing and c:IsAbleToHand()
end
function c24400048.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400048.thfil,tp,LOCATION_REMOVED,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_REMOVED)
end
function c24400048.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c24400048.thfil,tp,LOCATION_REMOVED,0,nil)
if g:GetCount()>=2 then
local sg=g:Select(tp,2,2,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c24400048.tagfil(c)
return (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing) and c:IsFaceup()
end
function c24400048.tgfil(c)
return c:IsType(TYPE_MONSTER) and (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing) and c:IsAbleToGrave()
end
function c24400048.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c24400048.tagfil,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c24400048.tgfil,tp,LOCATION_HAND,0,1,nil) end
Duel.SelectTarget(tp,c24400048.tagfil,tp,LOCATION_MZONE,0,1,1,nil)
end
function c24400048.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and Duel.IsExistingMatchingCard(c24400048.tgfil,tp,LOCATION_HAND,0,1,nil) then
local sc=Duel.SelectMatchingCard(tp,c24400048.tgfil,tp,LOCATION_HAND,0,1,1,nil):GetFirst()
Duel.SendtoGrave(sc,REASON_EFFECT)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(sc:GetBaseAttack())
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
--45钢
function c24400049.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+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(c24400049.target)
e1:SetOperation(c24400049.operation)
c:RegisterEffect(e1)
--cannot be destroyed
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e2:SetValue(c24400049.valcon)
e2:SetCountLimit(1)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_BATTLE_START)
e3:SetCountLimit(1,24400049)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c24400049.kktg)
e3:SetOperation(c24400049.kkop)
c:RegisterEffect(e3)
--Equip limit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_EQUIP_LIMIT)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetValue(c24400049.eqlimit)
c:RegisterEffect(e4)
end
c24400049.named_with_ZhanShuRenXing=true
function c24400049.eqlimit(e,c)
return (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400049.filter(c)
return c:IsFaceup() and (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400049.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and c24400049.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c24400049.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c24400049.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c24400049.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 c24400049.valcon(e,re,r,rp)
return bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0
end
function c24400049.kktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,0,1,nil,24400042,24400032,24400026,24400089) end
end
function c24400049.kkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c24400049.filter,tp,LOCATION_MZONE,0,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetValue(c24400049.tgoval)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetOwnerPlayer(tp)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
end
function c24400049.tgoval(e,re,rp)
return rp==1-e:GetOwnerPlayer()
end
--人形扩编
function c24400050.initial_effect(c)
--copy token
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,24400050)
e1:SetTarget(c24400050.cttg)
e1:SetOperation(c24400050.ctop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,13100050)
e2:SetCost(c24400050.thcost)
e2:SetTarget(c24400050.thtg)
e2:SetOperation(c24400050.thop)
c:RegisterEffect(e2)
end
c24400050.named_with_ZhanShuRenXing=true
function c24400050.tgfil(c)
return c:IsFaceup()
end
function c24400050.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c24400050.tgfil,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,24400051,0,TYPES_TOKEN_MONSTER,-2,0,0,RACE_MACHINE,ATTRIBUTE_EARTH) end
Duel.SelectTarget(tp,c24400050.tgfil,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c24400050.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,24400051,0,TYPES_TOKEN_MONSTER,-2,0,0,RACE_MACHINE,ATTRIBUTE_EARTH) then
local atk=tc:GetBaseAttack()
local def=tc:GetBaseDefense()
local token=Duel.CreateToken(tp,24400051)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
e2:SetValue(def)
token:RegisterEffect(e2)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(tc:GetCode())
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1)
Duel.SpecialSummonComplete()
end
end
function c24400050.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST)
end
function c24400050.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c24400050.thop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(c24400050.xhcon)
e1:SetOperation(c24400050.xhop)
if Duel.GetCurrentPhase()<=PHASE_STANDBY then
e1:SetReset(RESET_PHASE+PHASE_STANDBY,2)
else
e1:SetReset(RESET_PHASE+PHASE_STANDBY)
end
Duel.RegisterEffect(e1,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_SKIP_DP)
e1:SetTargetRange(1,0)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_DRAW then
e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN,2)
else
e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN)
end
Duel.RegisterEffect(e1,tp)
end
function c24400050.xhcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetLabel() and e:GetHandler():IsAbleToHand() and e:GetHandler():IsLocation(LOCATION_GRAVE)
end
function c24400050.xhop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,24400050)
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,e:GetHandler())
end
\ No newline at end of file
--特战人形-AK-ALFA
function c24400052.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400052,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,24400052)
e1:SetCondition(c24400052.thcon)
e1:SetTarget(c24400052.thtg)
e1:SetOperation(c24400052.thop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400052,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_BATTLE_START)
e2:SetCountLimit(1)
e2:SetCondition(c24400052.descon)
e2:SetTarget(c24400052.destg)
e2:SetOperation(c24400052.desop)
c:RegisterEffect(e2)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(24400052,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,24400152)
e3:SetCondition(c24400052.spcon)
e3:SetTarget(c24400052.sptg)
e3:SetOperation(c24400052.spop)
c:RegisterEffect(e3)
end
c24400052.named_with_TeZhanRenXing=true
function c24400052.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c24400052.thfilter(c)
return c.named_with_ZhanShuRenXing and c:IsLevel(1) and c:IsAbleToHand()
end
function c24400052.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400052.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c24400052.spfil(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400052.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c24400052.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if Duel.IsExistingMatchingCard(c24400052.spfil,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(24400052,0)) then
local sg=Duel.SelectMatchingCard(tp,c24400052.spfil,tp,LOCATION_HAND,0,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c24400052.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c24400052.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler():GetBattleTarget(),1,0,0)
end
function c24400052.desop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetHandler():GetBattleTarget()
if bc:IsRelateToBattle() then
Duel.Destroy(bc,REASON_EFFECT)
end
end
function c24400052.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
and rp==1-tp and c:IsPreviousControler(tp)
end
function c24400052.xspfil(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and e:GetHandler():GetMaterial():IsContains(c)
end
function c24400052.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400052.xspfil,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c24400052.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c24400052.xspfil),tp,LOCATION_GRAVE,0,nil,e,tp)
if g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--酒精饮料
function c24400053.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+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(c24400053.target)
e1:SetOperation(c24400053.operation)
c:RegisterEffect(e1)
--Atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(-400)
c:RegisterEffect(e2)
--battle indestructable
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
c:RegisterEffect(e3)
--redirect
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCondition(c24400053.recon)
e4:SetValue(LOCATION_HAND)
c:RegisterEffect(e4)
--
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(24400053,0))
e5:SetCategory(CATEGORY_ATKCHANGE)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_DAMAGE_STEP_END)
e5:SetRange(LOCATION_SZONE)
e5:SetCondition(c24400053.atkcon)
e5:SetTarget(c24400053.atktg)
e5:SetOperation(c24400053.atkop)
c:RegisterEffect(e5)
--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)
end
c24400053.named_with_ZhanShuRenXing=true
function c24400053.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 c24400053.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 c24400053.recon(e)
return e:GetHandler():IsFaceup()
end
function c24400053.atkcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetEquipTarget()
return tc:IsRelateToBattle()
end
function c24400053.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetEquipTarget():IsAbleToHand() end
Duel.SetTargetCard(e:GetHandler():GetEquipTarget())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler():GetEquipTarget(),1,0,0)
end
function c24400053.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetHandler():GetEquipTarget()
if tc:IsRelateToEffect(e) then
if tc:IsCode(24400020,24400035,24400055,24400056,24400055) and Duel.IsExistingMatchingCard(Card.IsType,tp,0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) and Duel.SelectYesNo(tp,aux.Stringid(24400053,0)) then
local dg=Duel.SelectMatchingCard(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,2,nil,TYPE_SPELL+TYPE_TRAP)
Duel.Destroy(dg,REASON_EFFECT)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
Duel.Recover(tp,tc:GetAttack(),REASON_EFFECT)
end
end
--遗留的武器库
function c24400054.initial_effect(c)
--redirect
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCondition(c24400054.recon)
e0:SetValue(LOCATION_HAND)
c:RegisterEffect(e0)
--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+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(c24400054.target)
e1:SetOperation(c24400054.operation)
c:RegisterEffect(e1)
--Atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(800)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(24400054,0))
e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,24400054)
e3:SetCondition(c24400054.xxcon1)
e3:SetTarget(c24400054.tgtg1)
e3:SetOperation(c24400054.tgop1)
c:RegisterEffect(e3)
--to grave
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(24400054,1))
e4:SetCategory(CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,13100054)
e4:SetCondition(c24400054.xxcon2)
e4:SetCost(c24400054.tgcost2)
e4:SetTarget(c24400054.tgtg2)
e4:SetOperation(c24400054.tgop2)
c:RegisterEffect(e4)
--Atk up
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_EQUIP)
e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetCondition(c24400054.xxcon3)
e5:SetValue(400)
c:RegisterEffect(e5)
--
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(24400054,2))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(1,33100054)
e5:SetCondition(c24400054.xxcon3)
e5:SetCost(c24400054.spcost)
e5:SetTarget(c24400054.sptg)
e5:SetOperation(c24400054.spop)
c:RegisterEffect(e5)
--immune
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_EQUIP)
e6:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_MZONE)
e6:SetValue(1)
e6:SetCondition(c24400054.xxcon4)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e7)
--to hand
local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(24400054,3))
e8:SetCategory(CATEGORY_TOHAND)
e8:SetType(EFFECT_TYPE_QUICK_O)
e8:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e8:SetRange(LOCATION_SZONE)
e8:SetCountLimit(1,43100054)
e8:SetCondition(c24400054.atkcon)
e8:SetCost(c24400054.atkcost)
e8:SetTarget(c24400054.atktg)
e8:SetOperation(c24400054.atkop)
c:RegisterEffect(e8)
--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)
end
c24400054.named_with_ZhanShuRenXing=true
function c24400054.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 c24400054.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 c24400054.recon(e)
return e:GetHandler():IsFaceup()
end
function c24400054.xxcon1(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetEquipTarget()
return tc and tc.named_with_ZhanShuRenXing
end
function c24400054.tgfil(c)
return c.named_with_ZhanShuRenXing and c:IsAbleToGrave()
end
function c24400054.tgtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetEquipTarget():IsAbleToHand() and Duel.IsExistingMatchingCard(c24400054.tgfil,tp,LOCATION_DECK,0,2,nil) end
Duel.SetTargetCard(e:GetHandler():GetEquipTarget())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler():GetEquipTarget(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK)
end
function c24400054.tgop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetHandler():GetEquipTarget()
local g=Duel.GetMatchingGroup(c24400054.tgfil,tp,LOCATION_DECK,0,nil)
if tc:IsRelateToEffect(e) and g:GetCount()>=2 then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
local sg=g:Select(tp,2,2,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
function c24400054.xxcon2(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetEquipTarget()
return tc and tc.named_with_TeZhanRenXing
end
function c24400054.tgcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,2) end
Duel.DiscardDeck(tp,2,REASON_COST)
end
function c24400054.tgtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_HAND,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_ONFIELD)
end
function c24400054.tgop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g1=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil)
local g2=Duel.GetMatchingGroup(nil,tp,0,LOCATION_HAND,nil)
if g1:GetCount()>0 and g2:GetCount()>0 then
local sg=g1:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
local tc=g2:RandomSelect(tp,1):GetFirst()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PUBLIC)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
function c24400054.xxcon3(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetEquipTarget()
return tc and tc:IsCode(24400036,24400021,24400037)
end
function c24400054.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function c24400054.spfil(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsCode(24400003,24400005) or (c:IsLevel(1) and c.named_with_ZhanShuRenXing))
end
function c24400054.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400054.spfil,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c24400054.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c24400054.spfil,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
function c24400054.xxcon4(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetEquipTarget()
return tc and tc:IsCode(24400056,24400058)
end
function c24400054.atkcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetEquipTarget()
local a,b=Duel.GetBattleMonster(tp)
return tc and a==tc and tc:GetBattleTarget()~=nil
end
function c24400054.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(24400054)==0 end
c:RegisterFlagEffect(24400054,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL,0,1)
end
function c24400054.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,1-tp,LOCATION_MZONE)
end
function c24400054.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
--铁血特战-M16A1-S.F
function c24400055.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,c24400055.mfilter,c24400055.xyzcheck,3,3)
--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:SetValue(c24400055.atkval)
c:RegisterEffect(e1)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400055,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,24400055)
e1:SetCondition(c24400055.descon)
e1:SetTarget(c24400055.destg)
e1:SetOperation(c24400055.desop)
c:RegisterEffect(e1)
--pos
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400055,1))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,33100055)
e2:SetCost(c24400055.pocost)
e2:SetTarget(c24400055.potg)
e2:SetOperation(c24400055.poop)
c:RegisterEffect(e2)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400055,2))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,33100055)
e2:SetCost(c24400055.tgcost)
e2:SetTarget(c24400055.tgtg)
e2:SetOperation(c24400055.tgop)
c:RegisterEffect(e2)
end
function c24400055.mfilter(c,xyzc)
return c:IsLevelAbove(1) and c.named_with_TeZhanRenXing
end
function c24400055.xyzcheck(g)
return g:GetClassCount(Card.GetLevel)==g:GetCount()
end
function c24400055.atkval(e,c)
return c:GetEquipCount()*800
end
function c24400055.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c24400055.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) and e:GetHandler():GetMaterialCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,0,1-tp,LOCATION_ONFIELD)
end
function c24400055.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local x=c:GetMaterialCount()
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
local dg=g:Select(tp,1,x,nil)
Duel.Destroy(dg,REASON_EFFECT)
end
end
function c24400055.pocost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c24400055.potg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c24400055.poop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
end
end
function c24400055.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c24400055.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_MZONE)
end
function c24400055.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
local dg=g:GetMaxGroup(Card.GetAttack)
Duel.HintSelection(dg)
Duel.SendtoGrave(dg,REASON_EFFECT)
end
end
--战术人形-M16A1
function c24400056.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(1,24400056)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c24400056.spcon)
c:RegisterEffect(e1)
--summon with no tribute
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400056,0))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SUMMON_PROC)
e2:SetCondition(c24400056.ntcon)
c:RegisterEffect(e2)
--change level
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SUMMON_COST)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetOperation(c24400056.lvop)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetCountLimit(1,24400156)
e4:SetTarget(c24400056.thtg)
e4:SetOperation(c24400056.thop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e5)
--avoid battle damage
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_MZONE)
e6:SetCountLimit(1)
e6:SetValue(1)
c:RegisterEffect(e6)
end
c24400056.named_with_ZhanShuRenXing=true
function c24400056.filter(c)
return c:IsFaceup() and (c.named_with_ZhanShuRenXing or c.named_with_TeZhanRenXing)
end
function c24400056.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(c24400056.filter,c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c24400056.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c24400056.lvcon(e)
return e:GetHandler():GetMaterialCount()==0
end
function c24400056.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c24400056.lvcon)
e1:SetValue(4)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_BASE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c24400056.lvcon)
e2:SetValue(2000)
e2:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e2)
end
function c24400056.thfilter(c)
return c.named_with_ZhanShuRenXing and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c24400056.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400056.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c24400056.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c24400056.thfilter,tp,LOCATION_DECK,0,1,nil)
if g:GetCount()>0 then
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
\ No newline at end of file
--忤逆小队-AK12
function c24400057.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--add code
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_ADD_CODE)
e0:SetValue(24400072)
c:RegisterEffect(e0)
--set
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,24400057)
e1:SetCondition(c24400057.setcon)
e1:SetTarget(c24400057.settg)
e1:SetOperation(c24400057.setop)
c:RegisterEffect(e1)
--control
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_CONTROL)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c24400057.cncost)
e2:SetTarget(c24400057.cntg)
e2:SetOperation(c24400057.cnop)
c:RegisterEffect(e2)
--add counter
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetOperation(aux.chainreg)
c:RegisterEffect(e3)
local e33=Effect.CreateEffect(c)
e33:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e33:SetCode(EVENT_CHAIN_SOLVING)
e33:SetProperty(EFFECT_FLAG_DELAY)
e33:SetRange(LOCATION_MZONE)
e33:SetOperation(c24400057.acop)
c:RegisterEffect(e33)
--check counter number
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_LEAVE_FIELD_P)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetOperation(c24400057.regop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(24400057,0))
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,24400157)
e5:SetCondition(c24400057.thcon)
e5:SetTarget(c24400057.thtg)
e5:SetOperation(c24400057.thop)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(24400057,1))
e6:SetCategory(CATEGORY_DISABLE)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e6:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE+EFFECT_FLAG_DAMAGE_STEP)
e6:SetCode(EVENT_LEAVE_FIELD)
e6:SetRange(LOCATION_MZONE)
e6:SetCountLimit(1,24400157)
e6:SetCondition(c24400057.thcon)
e6:SetTarget(c24400057.ngtg)
e6:SetOperation(c24400057.ngop)
e6:SetLabelObject(e4)
c:RegisterEffect(e6)
end
c24400057.named_with_ZhanShuRenXing=true
c24400057.named_with_TeZhanRenXing=true
c24400057.named_with_WuNiTeam=true
function c24400057.setcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c24400057.setfilter(c)
return c.named_with_ZhanShuRenXing and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function c24400057.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400057.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c24400057.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c24400057.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
end
end
function c24400057.cnfil(c)
return c:IsRace(RACE_MACHINE) and c:IsControlerCanBeChanged()
end
function c24400057.ctfil(c)
return c:IsAbleToRemoveAsCost() and (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400057.cncost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400057.ctfil,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c24400057.ctfil,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c24400057.cntg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400057.cnfil,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,1-tp,LOCATION_MZONE)
end
function c24400057.cnop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c24400057.cnfil,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
local tc=g:Select(tp,1,1,nil):GetFirst()
Duel.GetControl(tc,tp,PHASE_END,1)
end
end
function c24400057.acop(e,tp,eg,ep,ev,re,r,rp)
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 and Duel.IsExistingMatchingCard(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,0x1f65,1) then
Duel.Hint(HINT_CARD,0,24400057)
local tc=Duel.SelectMatchingCard(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x1f65,1):GetFirst()
tc:AddCounter(0x1f65,1)
end
end
function c24400057.cfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:GetCounter(0x1f65)>=3
end
function c24400057.regop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(c24400057.cfilter,1,nil) then
e:SetLabel(1)
else e:SetLabel(0) end
end
function c24400057.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetLabel()==1
end
function c24400057.thfilter(c)
return (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing) and c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c24400057.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400057.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c24400057.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c24400057.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 c24400057.ngtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
end
function c24400057.ngop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local tc=Duel.SelectMatchingCard(tp,aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil):GetFirst()
if tc then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
--特战人形-M16A1
function c24400058.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,24400058)
e1:SetCondition(c24400058.thcon)
e1:SetTarget(c24400058.thtg)
e1:SetOperation(c24400058.thop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400058,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,24400158)
e2:SetTarget(c24400058.sptg)
e2:SetOperation(c24400058.spop)
c:RegisterEffect(e2)
--pos
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(24400058,2))
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(c24400058.pocost)
e3:SetTarget(c24400058.potg)
e3:SetOperation(c24400058.poop)
c:RegisterEffect(e3)
--atk
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(c24400058.atkval)
c:RegisterEffect(e4)
end
c24400058.named_with_TeZhanRenXing=true
function c24400058.atkval(e,c)
return c:GetEquipCount()*800
end
function c24400058.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c24400058.thfilter(c)
return c:IsType(TYPE_EQUIP) and c.named_with_ZhanShuRenXing and c:IsAbleToHand()
end
function c24400058.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400058.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c24400058.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c24400058.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c24400058.spfil(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCode(24400036)
end
function c24400058.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400058.spfil,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c24400058.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c24400058.spfil,tp,LOCATION_GRAVE,0,nil,e,tp)
if g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
function c24400058.pocost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c24400058.potg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c24400058.poop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
end
end
--心智升级 ST.AR-15
function c24400059.initial_effect(c)
c:EnableReviveLimit()
--Cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--add counter
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400059,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c24400059.cttg)
e1:SetOperation(c24400059.ctop)
c:RegisterEffect(e1)
--attack all
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ATTACK_ALL)
e2:SetValue(c24400059.atkfilter)
c:RegisterEffect(e2)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,24400021,24400037))
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
c:RegisterEffect(e3)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetValue(c24400059.efilter)
c:RegisterEffect(e3)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(c24400059.bgmop)
c:RegisterEffect(e1)
end
function c24400059.bgmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(24400059,0))
end
c24400059.named_with_ZhanShuRenXing=true
c24400059.assault_name=24400062
function c24400059.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,0x1f67,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x1f67,1)
end
function c24400059.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:AddCounter(0x1f67,1) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCondition(c24400059.lvcon)
tc:RegisterEffect(e1)
end
end
function c24400059.lvcon(e)
return e:GetHandler():GetCounter(0x1f67)>0
end
function c24400059.atkfilter(e,c)
if c:GetCounter(0x1f67)>0 then
return 2
else
return 0
end
end
function c24400059.efilter(e,te)
if te:GetHandlerPlayer()==e:GetHandlerPlayer() then return false end
if not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return not g or not g:IsContains(e:GetHandler())
end
--最后愿望
function c24400060.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c24400060.actg)
e1:SetOperation(c24400060.acop)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c24400060.handcon)
c:RegisterEffect(e2)
end
c24400060.named_with_ZhanShuRenXing=true
function c24400060.filter(c)
return c:IsFaceup() and c:IsCode(24400062,24400059)
end
function c24400060.handcon(e)
return Duel.IsExistingMatchingCard(c24400060.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c24400060.acfil(c,e,tp)
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) and c:IsCode(24400059,24400062) then return false end
return c:IsFaceup() and (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400060.actg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c24400060.acfil,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.SelectTarget(tp,c24400060.acfil,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
end
function c24400060.acop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(24400060,1))
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
tc:RegisterEffect(e2)
end
end
--废弃物
function c24400061.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,24400061+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c24400061.actg)
e1:SetOperation(c24400061.acop)
c:RegisterEffect(e1)
end
c24400061.named_with_ZhanShuRenXing=true
function c24400061.acfil(c)
return c:IsAbleToGrave() and (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing) and c:IsType(TYPE_MONSTER)
end
function c24400061.actg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400061.acfil,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_REMOVED)
end
function c24400061.acop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c24400061.acfil,tp,LOCATION_DECK+LOCATION_REMOVED,0,nil)
if g:GetCount()>0 then
local sg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
if Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,24400024) or Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,24400031) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400061,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetOperation(c24400061.spop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
function c24400061.spfil(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCode(24400024,24400031)
end
function c24400061.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c24400061.spfil,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(24400061,1)) then
Duel.Hint(HINT_CARD,0,24400061)
local sg=Duel.SelectMatchingCard(tp,c24400061.spfil,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
--战术人形-AR15
function c24400062.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c24400062.spcon)
e1:SetOperation(c24400062.spop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400062,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,24400062)
e2:SetTarget(c24400062.sptg2)
e2:SetOperation(c24400062.spop2)
c:RegisterEffect(e2)
--can not be target
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(c24400062.xxtg)
e3:SetOperation(c24400062.xxop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
end
c24400062.named_with_ZhanShuRenXing=true
function c24400062.filter(c)
return c:IsFaceup() and (c.named_with_ZhanShuRenXing or c.named_with_TeZhanRenXing)
end
function c24400062.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(c24400062.filter,c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c24400062.spop(e,tp,eg,ep,ev,re,r,rp,c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+0xff0000)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(c:GetAttack()/2)
c:RegisterEffect(e1)
end
function c24400062.spfilter2(c,e,tp)
return c:IsCode(24400036) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c24400062.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c24400062.spfilter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c24400062.spop2(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,aux.NecroValleyFilter(c24400062.spfilter2),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c24400062.xxtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c24400062.xxop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
--cannot target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetValue(aux.tgoval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--再点火
function c24400063.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,24400063+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c24400063.actg)
e1:SetOperation(c24400063.acop)
c:RegisterEffect(e1)
end
c24400063.named_with_ZhanShuRenXing=true
function c24400063.acfil(c,e,tp)
return c:IsFaceup() and (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400063.actg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c24400063.acfil,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.SelectTarget(tp,c24400063.acfil,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
end
function c24400063.acop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(24400063,1))
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCountLimit(1)
e3:SetOperation(c24400063.tgop)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetValue(c24400063.damval2)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c24400063.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,24400063)
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
Duel.Damage(tp,e:GetHandler():GetAttack(),REASON_EFFECT)
end
function c24400063.damval2(e,re,val,r,rp,rc)
if bit.band(r,REASON_EFFECT+REASON_BATTLE)==0 then return end
return val*2
end
--压缩启动
local s,id=GetID()
function s.initial_effect(c)
--special summon
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(id,0))
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e7:SetProperty(EFFECT_FLAG_DELAY)
e7:SetCode(EVENT_TO_GRAVE)
e7:SetCountLimit(1,id)
e7:SetOperation(s.regop)
c:RegisterEffect(e7)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,id+10000)
e1:SetCondition(s.spcon2)
e1:SetTarget(s.sptg2)
e1:SetOperation(s.spop2)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_REMOVE)
c:RegisterEffect(e2)
--Activate(summon)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,3))
e4:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_ACTIVATE)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetCountLimit(1,id+20000)
e4:SetTarget(s.target2)
e4:SetOperation(s.activate2)
c:RegisterEffect(e4)
local e3=e4:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--Activate(effect)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,3))
e5:SetCategory(CATEGORY_NEGATE+CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_ACTIVATE)
e5:SetCode(EVENT_CHAINING)
e5:SetCountLimit(1,id+20000)
e5:SetCondition(s.condition2)
e5:SetTarget(s.target2)
e5:SetOperation(s.activate2)
c:RegisterEffect(e5)
end
s.named_with_ZhanShuRenXing=true
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(s.spcon)
e1:SetOperation(s.spop)
if Duel.GetCurrentPhase()<=PHASE_STANDBY then
e1:SetReset(RESET_PHASE+PHASE_STANDBY,2)
else
e1:SetReset(RESET_PHASE+PHASE_STANDBY)
end
Duel.RegisterEffect(e1,tp)
end
function s.tdfil(c)
return c.named_with_ZhanShuRenXing and c:IsAbleToDeck()
end
function s.thfil(c)
return (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing) and c:IsAbleToHand()
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetLabel() and Duel.IsExistingMatchingCard(s.tdfil,tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(s.thfil,tp,LOCATION_DECK,0,1,nil)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
local g1=Duel.SelectMatchingCard(tp,s.tdfil,tp,LOCATION_HAND,0,1,1,nil)
if g1:GetCount()>0 then
g1:AddCard(e:GetHandler())
Duel.SendtoDeck(g1,nil,2,REASON_EFFECT)
local g2=Duel.SelectMatchingCard(tp,s.thfil,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(g2,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g2)
end
end
function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and rp==1-tp and c:IsPreviousControler(tp)
and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function s.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
and (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.condition2(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
function s.filter(c,e,tp)
return (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function s.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function s.activate2(e,tp,eg,ep,ev,re,r,rp)
local tn=eg:GetFirst()
while tn do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tn:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tn:RegisterEffect(e2)
tn=eg:GetNext()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_EFFECT)
end
--归乡行动
function c24400065.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c24400065.atkfil)
e2:SetValue(c24400065.val)
c:RegisterEffect(e2)
--add counter
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(aux.chainreg)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(24400065,0))
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_SZONE)
e3:SetOperation(c24400065.acop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(24400065,0))
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_PHASE+PHASE_STANDBY)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1)
e4:SetOperation(c24400065.acop1)
c:RegisterEffect(e4)
--to grave
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOGRAVE)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(1)
e5:SetCost(c24400065.tgcost)
e5:SetTarget(c24400065.tgtg)
e5:SetOperation(c24400065.tgop)
c:RegisterEffect(e5)
--indes
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e6:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e6:SetRange(LOCATION_MZONE)
e6:SetTargetRange(LOCATION_MZONE,0)
e6:SetTarget(c24400065.indtg)
e6:SetValue(c24400065.indct)
c:RegisterEffect(e6)
end
c24400065.named_with_ZhanShuRenXing=true
function c24400065.atkfil(e,c)
return (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400065.atkfil1(c)
return (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400065.val(e,c)
return Duel.GetMatchingGroupCount(c24400065.atkfil1,c:GetControler(),LOCATION_MZONE,0,nil)*300
end
function c24400065.acop(e,tp,eg,ep,ev,re,r,rp)
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 and Duel.IsExistingMatchingCard(Card.IsCanAddCounter,tp,LOCATION_MZONE,0,1,nil,0x1f64,1) then
Duel.Hint(HINT_CARD,0,24400065)
local tc=Duel.SelectMatchingCard(tp,Card.IsCanAddCounter,tp,LOCATION_MZONE,0,1,1,nil,0x1f64,1):GetFirst()
tc:AddCounter(0x1f64,1)
end
end
function c24400065.acop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(Card.IsCanAddCounter,tp,LOCATION_MZONE,0,1,nil,0x1f64,1) then
Duel.Hint(HINT_CARD,0,24400065)
local tc=Duel.SelectMatchingCard(tp,Card.IsCanAddCounter,tp,LOCATION_MZONE,0,1,1,nil,0x1f64,1):GetFirst()
tc:AddCounter(0x1f64,1)
end
end
function c24400065.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x1f64,3,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x1f64,3,REASON_COST)
end
function c24400065.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,3,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,3,1-tp,LOCATION_ONFIELD)
end
function c24400065.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>=3 then
local dg=g:RandomSelect(tp,3)
Duel.HintSelection(dg)
Duel.SendtoGrave(dg,REASON_EFFECT)
end
end
function c24400065.indtg(e,c)
return c:IsFaceup() and (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400065.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
return 1
else return 0 end
end
--基层指令
function c24400066.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400066,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_BE_BATTLE_TARGET)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,24400066+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c24400066.condition)
e1:SetCost(c24400066.cost)
e1:SetTarget(c24400066.target)
e1:SetOperation(c24400066.activate)
c:RegisterEffect(e1)
end
c24400066.named_with_ZhanShuRenXing=true
function c24400066.condition(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return tc:IsFaceup() and tc:IsControler(tp) and tc:IsCode(24400021,24400036)
end
function c24400066.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
g:RemoveCard(e:GetHandler())
return g:GetCount()>0 and g:FilterCount(Card.IsDiscardable,nil)==g:GetCount()
end
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c24400066.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,POS_FACEDOWN) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,POS_FACEDOWN)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
end
function c24400066.dafil(c,e,tp)
return c:IsControler(1-tp) and c:IsType(TYPE_MONSTER)
end
function c24400066.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,POS_FACEDOWN)
Duel.NegateAttack()
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
local sg=g:Filter(c24400066.dafil,nil,e,tp)
local atk=sg:GetSum(Card.GetAttack)
Duel.SetLP(1-tp,Duel.GetLP(1-tp)-atk)
end
end
--心智升级
function c24400067.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,24400067)
e1:SetCost(c24400067.cost)
e1:SetTarget(c24400067.target)
e1:SetOperation(c24400067.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CUSTOM+24400067)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,13100067)
e2:SetTarget(c24400067.thtg)
e2:SetOperation(c24400067.thop)
c:RegisterEffect(e2)
end
c24400067.named_with_ZhanShuRenXing=true
function c24400067.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c24400067.filter1(c,e,tp)
return c.named_with_ZhanShuRenXing and Duel.IsExistingMatchingCard(c24400067.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) and c:IsReleasable()
end
function c24400067.filter2(c,e,tp,tc)
local tcode=tc:GetCode()
return c.named_with_ZhanShuRenXing and c.assault_name==tcode and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
end
function c24400067.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c24400067.filter1,tp,LOCATION_MZONE+LOCATION_HAND,0,nil,e,tp)
if chk==0 then
if e:GetLabel()~=1 then return false end
e:SetLabel(0)
return g:GetCount()>0
end
local rg=g:Select(tp,1,1,nil)
e:SetLabelObject(rg:GetFirst())
Duel.Release(rg,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c24400067.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local xc=e:GetLabelObject()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c24400067.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,xc):GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400067,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CLIENT_HINT)
e1:SetOperation(c24400067.checkop)
tc:RegisterEffect(e1,true)
tc:CompleteProcedure()
end
end
function c24400067.checkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.RaiseEvent(c,EVENT_CUSTOM+24400067,e,0,0,tp,0)
e:Reset()
end
function c24400067.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c24400067.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,e:GetHandler())
end
end
--冲程止点
function c24400068.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCountLimit(1,24400068+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c24400068.condition)
e1:SetTarget(c24400068.target)
e1:SetOperation(c24400068.activate)
c:RegisterEffect(e1)
end
c24400068.named_with_ZhanShuRenXing=true
function c24400068.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
function c24400068.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c24400068.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateAttack() then
Duel.BreakEffect()
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
end
--cannot be target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_CANNOT_SELECT_EFFECT_TARGET)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,24400036,24400021,24400037))
e1:SetValue(aux.tgoval)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e2:SetValue(aux.imval1)
Duel.RegisterEffect(e2,tp)
end
--集结-AR小队
function c24400069.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c24400069.cost1)
e1:SetTarget(c24400069.target1)
e1:SetOperation(c24400069.operation1)
c:RegisterEffect(e1)
--instant(chain)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400069,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_CHAINING)
e2:SetCondition(c24400069.condition2)
e2:SetCost(c24400069.cost2)
e2:SetTarget(c24400069.target2)
e2:SetOperation(c24400069.operation2)
c:RegisterEffect(e2)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c24400069.atkfil)
e2:SetValue(500)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
end
c24400069.named_with_ZhanShuRenXing=true
function c24400069.atkfil(c)
return c:IsFaceup() and (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400069.acfil(c)
return c:IsFaceup() and c:IsCode(24400036,24400021,24400037)
end
function c24400069.cfilter(c)
return c:IsFaceup() and not c:IsCode(24400036,24400021,24400037) and (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400069.ctfil(c)
return (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing) and c:IsAbleToGrave()
end
function c24400069.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400069.acfil,tp,LOCATION_MZONE,0,1,nil) and Duel.GetFlagEffect(tp,24400069)==0 end
e:SetLabel(0)
local ct=Duel.GetCurrentChain()
if ct==1 then return end
local pe=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT)
if not Duel.IsExistingMatchingCard(c24400069.cfilter,tp,LOCATION_MZONE,0,1,nil) then return false end
if not Duel.IsChainNegatable(ev) then return false end
if not Duel.IsExistingMatchingCard(c24400069.ctfil,tp,LOCATION_HAND,0,1,e:GetHandler()) then return end
if (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.SelectYesNo(tp,aux.Stringid(24400069,1)) then
Duel.DiscardHand(tp,c24400069.ctfil,1,1,REASON_COST)
e:SetLabel(1)
end
end
function c24400069.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if e:GetLabel()~=1 then return end
local ct=Duel.GetCurrentChain()
local te=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT)
local tc=te:GetHandler()
Duel.RegisterFlagEffect(tp,24400069,RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,tc,1,0,0)
end
function c24400069.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetLabel()~=1 then return end
local ct=Duel.GetChainInfo(0,CHAININFO_CHAIN_COUNT)
local tc=Duel.GetFirstTarget()
Duel.NegateEffect(ct-1)
end
function c24400069.condition2(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c24400069.cfilter,tp,LOCATION_MZONE,0,1,nil) then return false end
if not Duel.IsChainNegatable(ev) then return false end
return re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c24400069.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400069.ctfil,tp,LOCATION_HAND,0,1,e:GetHandler()) and Duel.GetFlagEffect(tp,24400069)==0 end
Duel.DiscardHand(tp,c24400069.ctfil,1,1,REASON_COST)
end
function c24400069.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.RegisterFlagEffect(tp,24400069,RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c24400069.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.NegateEffect(ev)
end
--坍塌液
function c24400070.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCountLimit(1,24400070+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c24400070.condition)
e1:SetCost(c24400070.cost)
e1:SetTarget(c24400070.target)
e1:SetOperation(c24400070.activate)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,24400070+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c24400070.condition1)
e1:SetCost(c24400070.cost)
e1:SetTarget(c24400070.target1)
e1:SetOperation(c24400070.activate)
c:RegisterEffect(e1)
end
c24400070.named_with_ZhanShuRenXing=true
function c24400070.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) and Duel.IsPlayerAffectedByEffect(tp,24400071) then
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
end
function c24400070.condition(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
return at:GetControler()~=tp and Duel.GetAttackTarget()==nil
end
function c24400070.target(e,tp,eg,ep,ev,re,r,rp,chk)
local at=Duel.GetAttacker()
if chk==0 then return at:GetAttack()>=Duel.GetLP(tp) end
e:SetLabel(1)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
end
function c24400070.condition1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return re:GetHandlerPlayer()~=tp and aux.damcon1(e,1-tp,eg,ep,ev,re,r,rp)
end
function c24400070.target1(e,tp,eg,ep,ev,re,r,rp,chk)
local ev=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if chk==0 then return ev>=Duel.GetLP(tp) end
e:SetLabel(2)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
end
function c24400070.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local x=e:GetLabel()
if x==1 then
--Avoid Damage
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetTargetRange(1,0)
e1:SetValue(c24400070.damval)
e1:SetReset(RESET_EVENT+EVENT_BATTLED)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
Duel.RegisterEffect(e2,tp)
else
--Avoid Damage
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetTargetRange(1,0)
e1:SetValue(c24400070.damval)
e1:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
Duel.RegisterEffect(e2,tp)
end
Duel.BreakEffect()
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT)
Duel.SetLP(tp,Duel.GetLP(tp)-8000)
Duel.SetLP(1-tp,Duel.GetLP(1-tp)-8000)
end
function c24400070.damval(e,re,val,r,rp,rc)
local c=e:GetHandler()
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
return 0
end
return val
end
--最终手段
function c24400071.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c24400071.condition2)
e1:SetTarget(c24400071.target2)
e1:SetOperation(c24400071.activate2)
c:RegisterEffect(e1)
end
c24400071.named_with_ZhanShuRenXing=true
function c24400071.condition2(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) and Duel.IsChainNegatable(ev) and rp==1-tp
end
function c24400071.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 c24400071.activate2(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,24400070))
e1:SetCondition(c24400071.ahcon)
e1:SetLabel(Duel.GetTurnCount())
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(24400071)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
function c24400071.ahcon(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(c24400071.ahfil,tp,LOCATION_MZONE,0,1,nil) and Duel.GetTurnCount()~=e:GetLabel()
end
function c24400071.ahfil(c)
return c:IsFaceup() and Card.IsCode(24400021,24400037)
end
--特战人形-AK12
function c24400072.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c24400072.spcon)
c:RegisterEffect(e1)
--control
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_CONTROL)
e1:SetDescription(aux.Stringid(24400072,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,24400072)
e1:SetTarget(c24400072.target)
e1:SetOperation(c24400072.operation)
c:RegisterEffect(e1)
--change effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400072,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,13100072)
e2:SetCondition(c24400072.chcon)
e2:SetTarget(c24400072.chtg)
e2:SetOperation(c24400072.chop)
c:RegisterEffect(e2)
if not c24400072.global_check then
c24400072.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c24400072.checkop)
Duel.RegisterEffect(ge1,0)
end
end
c24400072.named_with_TeZhanRenXing=true
c24400072.named_with_ZhanShuRenXing=true
function c24400072.ckfil(c)
return (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400072.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:Filter(c24400072.ckfil,nil):GetFirst()
while tc do
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),24400072,RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
function c24400072.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.GetFlagEffect(c:GetControler(),24400072)==0
end
function c24400072.cnfil(c)
return c:IsFaceup() and c:IsControlerCanBeChanged() and c:IsRace(RACE_MACHINE)
end
function c24400072.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c24400072.cnfil,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c24400072.cnfil,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c24400072.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(tc:GetAttack()/2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
Duel.BreakEffect()
Duel.GetControl(tc,tp,PHASE_END,1)
end
end
function c24400072.chcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function c24400072.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,0,1,nil) end
end
function c24400072.chop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,c24400072.repop)
end
function c24400072.repop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,0,nil)
if g:GetCount()>0 then
local sg=g:Select(1-tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
--起偏器
function c24400073.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c24400073.condition2)
e1:SetTarget(c24400073.target2)
e1:SetOperation(c24400073.activate2)
c:RegisterEffect(e1)
end
c24400073.named_with_ZhanShuRenXing=true
function c24400073.condition2(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) and Duel.IsChainNegatable(ev) and rp==1-tp
end
function c24400073.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)
end
function c24400073.activate2(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) then
Duel.BreakEffect()
local b1=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE,0,1,nil)
local b2=Duel.IsExistingMatchingCard(aux.NegateEffectMonsterFilter,tp,LOCATION_MZONE,0,1,nil)
local b3=true
if (b1 or b2 or b3) and Duel.SelectYesNo(1-tp,aux.Stringid(24400073,0)) then
if b1 and b2 and b3 then
op=Duel.SelectOption(1-tp,aux.Stringid(24400073,1),aux.Stringid(24400073,2),aux.Stringid(24400073,3))
elseif b1 and b2 then
op=Duel.SelectOption(1-tp,aux.Stringid(24400073,1),aux.Stringid(24400073,2))
elseif b1 and b3 then
op=Duel.SelectOption(1-tp,aux.Stringid(24400073,1),aux.Stringid(24400073,3))
if op==1 then op=op+1 end
elseif b2 and b3 then
op=Duel.SelectOption(1-tp,aux.Stringid(24400073,2),aux.Stringid(24400073,3))+1 elseif b1 then
op=Duel.SelectOption(1-tp,aux.Stringid(24400073,1))
elseif b2 then
op=Duel.SelectOption(1-tp,aux.Stringid(24400073,2))+1
elseif b3 then
op=Duel.SelectOption(1-tp,aux.Stringid(24400073,3))+2
end
if op==0 then
local tc=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
elseif op==1 then
local tc=Duel.SelectMatchingCard(tp,aux.NegateEffectMonsterFilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SET_ATTACK_FINAL)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(tc:GetAttack()/2)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
else
Duel.Recover(1-tp,2000,REASON_EFFECT)
end
end
end
end
--特战人形-AK15
function c24400074.initial_effect(c)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetCondition(c24400074.cnscon)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetValue(SUMMON_VALUE_SELF)
e2:SetCondition(c24400074.spcon)
e2:SetOperation(c24400074.spop)
c:RegisterEffect(e2)
--spsummon limit
local e22=Effect.CreateEffect(c)
e22:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e22:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e22:SetCode(EVENT_SPSUMMON_SUCCESS)
e22:SetCondition(c24400074.hspcon)
e22:SetOperation(c24400074.hspop)
c:RegisterEffect(e22)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(24400074,0))
e3:SetCategory(CATEGORY_COIN)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLED)
e3:SetCondition(c24400074.cncon)
e3:SetTarget(c24400074.cntg)
e3:SetOperation(c24400074.cnop)
c:RegisterEffect(e3)
--change battle target
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_ATTACK_ANNOUNCE)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,24400074)
e4:SetCondition(c24400074.condition2)
e4:SetOperation(c24400074.operation2)
c:RegisterEffect(e4)
if not c24400074.global_check then
c24400074.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c24400074.checkop)
Duel.RegisterEffect(ge1,0)
end
end
c24400074.named_with_TeZhanRenXing=true
c24400074.named_with_ZhanShuRenXing=true
c24400074.toss_coin=true
function c24400074.ckfil(c)
return (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400074.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:Filter(c24400074.ckfil,nil):GetFirst()
while tc do
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),24400074,RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
function c24400074.cnscon(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,0,1,nil,24400072)
end
function c24400074.hspcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF
end
function c24400074.hspop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c24400074.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c24400074.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400074.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.GetFlagEffect(c:GetControler(),24400074)==0
end
function c24400074.spop(e,tp,eg,ep,ev,re,r,rp,c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(0,1)
e3:SetValue(HALF_DAMAGE)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function c24400074.cncon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:GetCounter(0x1f65)>0 and bc:IsStatus(STATUS_OPPO_BATTLE) and bc:IsRelateToBattle()
end
function c24400074.cntg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1)
end
function c24400074.cnop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local res=Duel.TossCoin(tp,1)
if res==1 and Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_MZONE,1,nil) then
local tc=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,0,LOCATION_MZONE,1,1,nil):GetFirst()
if not tc:IsDisabled() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
Duel.AdjustInstantly()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
Duel.Destroy(tc,REASON_EFFECT)
end
elseif res==0 and e:GetHandler():IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(e:GetHandler()/2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2)
end
end
function c24400074.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()~=e:GetHandler()
end
function c24400074.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local at=Duel.GetAttacker()
if at:IsAttackable() and not at:IsImmuneToEffect(e) then
Duel.CalculateDamage(at,c)
end
end
end
--忤逆小队-AK15
function c24400075.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--add code
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_ADD_CODE)
e0:SetValue(24400074)
c:RegisterEffect(e0)
--coin
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COIN)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c24400075.cntg)
e1:SetOperation(c24400075.cnop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,24400075)
e2:SetCost(c24400075.spcost)
e2:SetTarget(c24400075.sptg)
e2:SetOperation(c24400075.spop)
c:RegisterEffect(e2)
--damage
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EVENT_BATTLE_DESTROYING)
e4:SetCondition(aux.bdocon)
e4:SetTarget(c24400075.damtg)
e4:SetOperation(c24400075.damop)
c:RegisterEffect(e4)
end
c24400075.named_with_TeZhanRenXing=true
c24400075.named_with_ZhanShuRenXing=true
c24400075.named_with_WuNiTeam=true
c24400075.toss_coin=true
function c24400075.cntg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1)
end
function c24400075.cnop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local res=Duel.TossCoin(tp,1)
if res==1 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) then
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
elseif res==0 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400075,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
c:RegisterEffect(e2)
end
end
function c24400075.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local tc=e:GetHandler():GetBattleTarget()
local atk=tc:GetAttack()
if atk<0 then atk=0 end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(atk/2)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk/2)
end
function c24400075.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)
end
function c24400075.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x1f65,1,REASON_COST) end
Duel.RemoveCounter(tp,1,1,0x1f65,1,REASON_COST)
end
function c24400075.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 c24400075.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(24400075,1)) then
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
--特战人形-RPK16
function c24400076.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c24400076.spcon)
e1:SetOperation(c24400076.spop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400076,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c24400076.atktg)
e2:SetOperation(c24400076.atkop)
c:RegisterEffect(e2)
--lpup
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(24400076,1))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCategory(CATEGORY_RECOVER)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c24400076.reccon)
e3:SetTarget(c24400076.rectg)
e3:SetOperation(c24400076.recop)
c:RegisterEffect(e3)
if not c24400076.global_check then
c24400076.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c24400076.checkop)
Duel.RegisterEffect(ge1,0)
end
end
c24400076.named_with_TeZhanRenXing=true
c24400076.named_with_ZhanShuRenXing=true
function c24400076.ckfil(c)
return (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400076.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:Filter(c24400076.ckfil,nil):GetFirst()
while tc do
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),24400076,RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
function c24400076.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.GetFlagEffect(c:GetControler(),24400074)==0
end
function c24400076.spop(e,tp,eg,ep,ev,re,r,rp,c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c24400076.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c24400076.splimit(e,c)
return not c.named_with_ZhanShuRenXing and not c.named_with_TeZhanRenXing
end
function c24400076.reccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c24400076.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500)
end
function c24400076.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function c24400076.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetAttack()~=c:GetBaseAttack() end
end
function c24400076.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local atk=math.abs(c:GetAttack()-c:GetBaseAttack())
if c:IsRelateToEffect(e) then
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
--忤逆小队-RPK16
function c24400077.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--add code
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_ADD_CODE)
e0:SetValue(24400076)
c:RegisterEffect(e0)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400077,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c24400077.settg)
e1:SetOperation(c24400077.setop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c24400077.atktg)
e2:SetOperation(c24400077.atkop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c24400077.atkval)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--def
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_UPDATE_DEFENSE)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetTarget(c24400077.atkfil)
e5:SetValue(800)
c:RegisterEffect(e5)
end
c24400077.named_with_TeZhanRenXing=true
c24400077.named_with_ZhanShuRenXing=true
c24400077.named_with_WuNiTeam=true
function c24400077.setfilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(true) and (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
end
function c24400077.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and c24400077.setfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c24400077.setfilter,tp,0,LOCATION_GRAVE,1,nil,tp) and e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,c24400077.setfilter,tp,0,LOCATION_GRAVE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
function c24400077.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SSet(tp,tc)
end
end
function c24400077.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetAttack()~=c:GetBaseAttack() end
end
function c24400077.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local atk=math.abs(c:GetAttack()-c:GetBaseAttack())
if c:IsRelateToEffect(e) then
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
function c24400077.ckfil(c)
return c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing
end
function c24400077.atkval(e)
local tp=e:GetHandlerPlayer()
return Duel.GetMatchingGroup(c24400077.ckfil,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetCount()*500
end
function c24400077.atkfil(e,c)
return c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing
end
--银狐的狡黠
function c24400078.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCountLimit(1,24400078+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c24400078.condition)
e1:SetCost(c24400078.cost)
e1:SetTarget(c24400078.target)
e1:SetOperation(c24400078.activate)
c:RegisterEffect(e1)
end
c24400078.named_with_ZhanShuRenXing=true
function c24400078.condition(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
return at:GetControler()~=tp and Duel.GetAttackTarget()==nil and Duel.GetMatchingGroupCount(nil,tp,LOCATION_MZONE,0,nil)==0
end
function c24400078.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(0)
if chk==0 then return Duel.CheckLPCost(tp,Duel.GetLP(tp)-100) end
e:SetLabel(Duel.GetLP(tp)-100)
Duel.PayLPCost(tp,Duel.GetLP(tp)-100)
end
function c24400078.rmfil(c,e,tp)
return c:IsCode(24400077) and c:IsAbleToRemove() and Duel.IsExistingMatchingCard(c24400078.spfil,tp,LOCATION_EXTRA,0,1,nil,e,tp)
end
function c24400078.spfil(c,e,tp)
return c:IsCode(24400079) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c24400078.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400078.rmfil,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_EXTRA+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c24400078.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local atk=e:GetLabel()
local g1=Duel.GetMatchingGroup(c24400078.rmfil,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,nil,e,tp)
if g1:GetCount()>0 then
local dg=g1:Select(tp,1,1,nil)
Duel.Remove(dg,POS_FACEUP,REASON_EFFECT)
local g2=Duel.GetMatchingGroup(c24400078.spfil,tp,LOCATION_EXTRA,0,nil,e,tp)
local tc=g2:Select(tp,1,1,nil):GetFirst()
Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
tc:CompleteProcedure()
end
end
--涅托-RPK-16
function c24400079.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(c24400079.synmat),2)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.synlimit)
c:RegisterEffect(e1)
--destroy
local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(24400079,1))
e8:SetCategory(CATEGORY_DESTROY)
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e8:SetCode(EVENT_SPSUMMON_SUCCESS)
e8:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e8:SetTarget(c24400079.destg)
e8:SetOperation(c24400079.desop)
c:RegisterEffect(e8)
--immune
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetRange(LOCATION_MZONE)
e0:SetValue(1)
c:RegisterEffect(e0)
--Battle remove
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_BATTLE_DESTROY_REDIRECT)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e2)
--disable and atk down
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetCondition(c24400079.adcon)
e3:SetTarget(c24400079.adtg)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_DISABLE_EFFECT)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_SET_ATTACK_FINAL)
e5:SetValue(c24400079.atkval)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e6:SetCode(EVENT_SPSUMMON_SUCCESS)
e6:SetOperation(c24400079.bgmop)
c:RegisterEffect(e6)
end
function c24400079.synmat(c)
return c.named_with_ZhanShuRenXing
end
function c24400079.bgmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(24400079,0))
end
function c24400079.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,0,0,0,0)
end
function c24400079.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,3,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
function c24400079.adcon(e)
local c=e:GetHandler()
return Duel.GetAttacker()==c and c:GetBattleTarget()
and (Duel.GetCurrentPhase()==PHASE_DAMAGE or Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL)
end
function c24400079.adtg(e,c)
return c==e:GetHandler():GetBattleTarget()
end
function c24400079.atkval(e,c)
return math.ceil(c:GetBaseAttack()/2)
end
--特战人形-AN94
function c24400080.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c24400080.spcon)
e1:SetOperation(c24400080.spop)
c:RegisterEffect(e1)
--control
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_CONTROL)
e1:SetDescription(aux.Stringid(24400080,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,24400080)
e1:SetTarget(c24400080.target)
e1:SetOperation(c24400080.operation)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(800)
e2:SetCondition(c24400080.atkcon)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--double
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e4:SetCondition(c24400080.damcon)
e4:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
c:RegisterEffect(e4)
if not c24400080.global_check then
c24400080.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c24400080.checkop)
Duel.RegisterEffect(ge1,0)
end
end
c24400080.named_with_TeZhanRenXing=true
c24400080.named_with_ZhanShuRenXing=true
function c24400080.ckfil(c)
return (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400080.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:Filter(c24400080.ckfil,nil):GetFirst()
while tc do
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),24400080,RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
function c24400080.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.GetFlagEffect(c:GetControler(),24400074)==0
end
function c24400080.spop(e,tp,eg,ep,ev,re,r,rp,c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(c:GetAttack()/2)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c24400080.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c24400080.splimit(e,c)
return not c.named_with_ZhanShuRenXing and not c.named_with_TeZhanRenXing
end
function c24400080.cnfil(c)
return c:IsFaceup() and c:IsControlerCanBeChanged() and c:IsRace(RACE_MACHINE)
end
function c24400080.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c24400080.cnfil,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c24400080.cnfil,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c24400080.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(tc:GetAttack()/2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
Duel.BreakEffect()
Duel.GetControl(tc,tp,PHASE_END,1)
end
end
function c24400080.atkcon(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,0,1,nil,24400072)
end
function c24400080.damcon(e)
return e:GetHandler():GetBattleTarget()~=nil and e:GetHandler():GetBattleTarget():GetCounter(0x1f65)
end
--忤逆小队-AN94
function c24400081.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--add code
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_ADD_CODE)
e0:SetValue(24400080)
c:RegisterEffect(e0)
--spsummon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400081,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,24400081)
e1:SetTarget(c24400081.sumtg)
e1:SetOperation(c24400081.sumop)
c:RegisterEffect(e1)
--cannot be target
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_MZONE,0)
e2:SetTarget(c24400081.tgtg)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--atk limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetValue(c24400081.tgtg)
c:RegisterEffect(e3)
--attack all
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_ATTACK_ALL)
e4:SetValue(c24400081.atkfilter)
c:RegisterEffect(e4)
end
c24400081.named_with_TeZhanRenXing=true
c24400081.named_with_ZhanShuRenXing=true
c24400081.named_with_WuNiTeam=true
function c24400081.filter(c,e,tp)
return c:IsType(TYPE_TUNER) and (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c24400081.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and Duel.IsExistingMatchingCard(c24400081.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c24400081.sumop(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,c24400081.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)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c24400081.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c24400081.splimit(e,c)
return not (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing) and c:IsLocation(LOCATION_EXTRA)
end
function c24400081.tgtg(e,c)
return c~=e:GetHandler() and (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400081.atkfilter(e,c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
\ No newline at end of file
--突如其然的背叛
function c24400082.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c24400082.accost)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_SZONE)
e2:SetTarget(c24400082.desreptg)
e2:SetValue(c24400082.desrepval)
e2:SetOperation(c24400082.desrepop)
c:RegisterEffect(e2)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsCode,24400077,24400076))
e2:SetValue(800)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--rm
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetTarget(c24400082.rmtg)
e3:SetOperation(c24400082.rmop)
c:RegisterEffect(e3)
--half
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CHANGE_DAMAGE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(1,0)
e4:SetValue(c24400082.damval)
c:RegisterEffect(e4)
end
c24400082.named_with_ZhanShuRenXing=true
function c24400082.ckfil(c)
return c:IsFaceup() and c:IsCode(24400077)
end
function c24400082.accost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400082.ckfil,tp,LOCATION_MZONE,0,1,nil) and Duel.CheckLPCost(tp,Duel.GetLP(tp)/2) end
Duel.PayLPCost(tp,Duel.GetLP(tp)/2)
end
function c24400082.repfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsCode(24400077)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c24400082.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(c24400082.repfilter,1,nil,tp)
and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function c24400082.desrepval(e,c)
return c24400082.repfilter(c,e:GetHandlerPlayer())
end
function c24400082.desrepop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
Duel.Hint(HINT_CARD,0,24400082)
end
function c24400082.rmfil(c)
return c:IsAbleToRemove() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c24400082.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400082.rmfil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD)
end
function c24400082.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c24400082.rmfil,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
local dg=g:Select(tp,1,1,nil)
Duel.Remove(dg,POS_FACEUP,REASON_EFFECT)
end
end
function c24400082.damval(e,re,val,r,rp,rc)
return math.floor(val/2)
end
--人形网络 二层平台
function c24400083.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,50218129+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c24400083.target)
e1:SetOperation(c24400083.activate)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c24400083.atkfil)
e2:SetValue(c24400083.val)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1)
e3:SetTarget(c24400083.idtg)
e3:SetOperation(c24400083.idop)
c:RegisterEffect(e3)
end
c24400083.named_with_ZhanShuRenXing=true
function c24400083.thfilter(c)
return c.named_with_ZhanShuRenXing and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c24400083.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400083.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c24400083.tdfil(c)
return c.named_with_ZhanShuRenXing and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c24400083.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c24400083.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
if Duel.IsExistingMatchingCard(c24400083.tdfil,tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(24400083,0)) then
Duel.BreakEffect()
local dg=Duel.SelectMatchingCard(tp,c24400083.tdfil,tp,LOCATION_GRAVE,0,1,5,nil)
Duel.SendtoDeck(dg,nil,2,REASON_EFFECT)
end
end
end
function c24400083.atkfil(e,c)
return (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400083.xxfil(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c24400083.atkval(e)
local tp=e:GetHandlerPlayer()
return Duel.GetMatchingGroupCount(c24400083.xxfil,tp,LOCATION_ONFIELD,0,nil)*400
end
function c24400083.acfil(c)
return c:IsFaceup() and (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400083.idtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c24400083.acfil,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.SelectTarget(tp,c24400083.acfil,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
end
function c24400083.idop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e2:SetDescription(aux.Stringid(24400083,1))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
tc:RegisterEffect(e2)
end
end
\ No newline at end of file
--心智升级-AN94
function c24400084.initial_effect(c)
c:EnableReviveLimit()
--Cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--add counter
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400084,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c24400084.cttg)
e1:SetOperation(c24400084.ctop)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c24400084.indct)
c:RegisterEffect(e2)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c24400084.tgcon)
e2:SetValue(aux.imval1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetValue(c24400084.atkval)
c:RegisterEffect(e2)
end
c24400084.named_with_ZhanShuRenXing=true
c24400084.assault_name=24400080
function c24400084.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,0x1f66,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x1f66,1)
end
function c24400084.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
tc:AddCounter(0x1f66,1)
end
end
function c24400084.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
return 1
else return 0 end
end
function c24400084.xxfil(c)
return c:IsFaceup() and c:IsCode(24400057)
end
function c24400084.tgcon(e)
return Duel.IsExistingMatchingCard(c24400084.xxfil,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end
function c24400084.atkval(e)
local tp=e:GetHandlerPlayer()
return Duel.GetCounter(tp,LOCATION_ONFIELD,LOCATION_ONFIELD,0x1f66)*400
end
--心智升级-AK15
function c24400085.initial_effect(c)
c:EnableReviveLimit()
--Cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c24400085.atkval)
c:RegisterEffect(e2)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c24400085.indct)
c:RegisterEffect(e2)
--cannot be target
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_MZONE,0)
e2:SetTarget(c24400085.tgtg)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--negate
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(24400085,1))
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(c24400085.discon)
e4:SetTarget(c24400085.distg)
e4:SetOperation(c24400085.disop)
c:RegisterEffect(e4)
--change battle target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c24400085.condition2)
e2:SetOperation(c24400085.operation2)
c:RegisterEffect(e2)
end
c24400085.named_with_ZhanShuRenXing=true
c24400085.assault_name=24400074
function c24400085.atkval(e)
return Duel.GetLP(tp)/2
end
function c24400085.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
return 1
else return 0 end
end
function c24400085.tgtg(e,c)
return c~=e:GetHandler() and (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400085.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c24400085.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function c24400085.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(500)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
end
end
function c24400085.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()~=e:GetHandler()
end
function c24400085.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local at=Duel.GetAttacker()
if at:IsAttackable() and not at:IsImmuneToEffect(e) then
Duel.CalculateDamage(at,c)
end
end
end
--双曲函数
function c24400086.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400086,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,24400086+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c24400086.condition)
e1:SetCost(c24400086.cost)
e1:SetTarget(c24400086.target)
e1:SetOperation(c24400086.activate)
c:RegisterEffect(e1)
end
function c24400086.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c24400086.ctfil(c)
return c:IsAbleToGraveAsCost() and (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400086.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400086.ctfil,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c24400086.ctfil,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c24400086.target(e,tp,eg,ep,ev,re,r,rp,chk)
local op=0
if Duel.CheckLocation(1-tp,LOCATION_SZONE,0) then op=op+1 end
if Duel.CheckLocation(1-tp,LOCATION_SZONE,1) then op=op+1 end
if Duel.CheckLocation(1-tp,LOCATION_SZONE,2) then op=op+1 end
if Duel.CheckLocation(1-tp,LOCATION_SZONE,3) then op=op+1 end
if Duel.CheckLocation(1-tp,LOCATION_SZONE,4) then op=op+1 end
if chk==0 then return op>=2 end
end
function c24400086.xckfil(c)
return c:IsFaceup() and c:IsCode(24400042,24400026,24400089)
end
function c24400086.ngfil(c)
return c:IsRace(RACE_MACHINE) and aux.NegateEffectMonsterFilter(c)
end
function c24400086.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local op=0
if Duel.CheckLocation(1-tp,LOCATION_SZONE,0) then op=op+1 end
if Duel.CheckLocation(1-tp,LOCATION_SZONE,1) then op=op+1 end
if Duel.CheckLocation(1-tp,LOCATION_SZONE,2) then op=op+1 end
if Duel.CheckLocation(1-tp,LOCATION_SZONE,3) then op=op+1 end
if Duel.CheckLocation(1-tp,LOCATION_SZONE,4) then op=op+1 end
if op<2 then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE_FIELD)
e1:SetOperation(c24400086.disop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if Duel.IsExistingMatchingCard(c24400086.xckfil,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c24400086.ngfil,tp,0,LOCATION_MZONE,1,nil) then
local g=Duel.GetMatchingGroup(c24400086.ngfil,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
end
function c24400086.actlimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c24400086.disop(e,tp)
local c=Duel.GetLocationCount(1-tp,LOCATION_SZONE,PLAYER_NONE,0)
if c==0 then return end
local dis1=Duel.SelectDisableField(tp,2,0,LOCATION_SZONE,0)
return dis1
end
--战术人形-ump40
function c24400087.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,24400087)
e1:SetCondition(c24400087.spcon)
e1:SetOperation(c24400087.spop)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c24400087.indct)
c:RegisterEffect(e2)
--cannot be target
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_MZONE,0)
e2:SetTarget(c24400087.tgtg)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--atk limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetValue(c24400087.tgtg)
c:RegisterEffect(e3)
--Destroy
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,24400187)
e4:SetCost(c24400087.dscost)
e4:SetTarget(c24400087.dstg)
e4:SetOperation(c24400087.dsop)
c:RegisterEffect(e4)
end
c24400087.named_with_ZhanShuRenXing=true
function c24400087.filter(c)
return c:IsFaceup() and (c.named_with_ZhanShuRenXing or c.named_with_TeZhanRenXing)
end
function c24400087.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(c24400087.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c24400087.spop(e,tp,eg,ep,ev,re,r,rp,c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(0,1)
e3:SetValue(HALF_DAMAGE)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function c24400087.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE)~=0 then
return 1
else return 0 end
end
function c24400087.tgtg(e,c)
return c.named_with_Xump45 and c:IsCode(24400089,24400026,24400042)
end
function c24400087.tgcfil(c)
return c:IsAbleToGraveAsCost() and (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400087.dscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400087.tgcfil,tp,LOCATION_REMOVED,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c24400087.tgcfil,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c24400087.dstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
end
function c24400087.dsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
if g:GetCount()>0 then
local sg=g:Select(tp,1,1,nil)
Duel.Destroy(sg,REASON_EFFECT+REASON_RETURN)
end
end
--看海的约定
function c24400088.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24400088,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_BE_BATTLE_TARGET)
e1:SetCountLimit(1,24400088)
e1:SetCondition(c24400088.atkcon)
e1:SetCost(c24400088.cost)
e1:SetTarget(c24400088.target1)
e1:SetOperation(c24400088.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400088,1))
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1,24400088)
e2:SetCondition(c24400088.tgcon)
e2:SetCost(c24400088.cost)
e2:SetTarget(c24400088.target2)
e2:SetOperation(c24400088.operation)
c:RegisterEffect(e2)
end
c24400088.named_with_ZhanShuRenXing=true
c24400088.assault_name=24400088
function c24400088.atkcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttackTarget()
return Duel.GetAttacker():IsControler(1-tp) and at:IsControler(tp) and at:IsFaceup() and (at.named_with_ZhanShuRenXing or at.named_with_TeZhanRenXing)
end
function c24400088.cfilter(c,tp)
return c:IsFaceup() and (c.named_with_ZhanShuRenXing or c.named_with_TeZhanRenXing) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp)
end
function c24400088.tgcon(e,tp,eg,ep,ev,re,r,rp)
if rp~=1-tp or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c24400088.cfilter,1,nil,tp)
end
function c24400088.ctfil(c)
return c:IsCode(24400087) and c:IsAbleToRemoveAsCost()
end
function c24400088.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400088.ctfil,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c24400088.ctfil,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c24400088.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:SetLabel(1)
end
function c24400088.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsChainNegatable(ev) end
e:SetLabel(2)
end
function c24400088.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local x=e:GetLabel()
if x==1 then
Duel.NegateAttack()
elseif x==2 then
Duel.NegateActivation(ev)
end
end
--心智升级-UMP45 MOD3
function c24400089.initial_effect(c)
c:EnableReviveLimit()
--Cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c24400089.indct)
c:RegisterEffect(e2)
--cannot be target
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_MZONE,0)
e2:SetTarget(c24400089.tgtg)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--atk limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetValue(c24400089.tgtg)
c:RegisterEffect(e3)
--atk down
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(0,LOCATION_MZONE)
e4:SetValue(-500)
c:RegisterEffect(e4)
--Destroy
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCost(c24400089.dscost)
e5:SetTarget(c24400089.dstg)
e5:SetOperation(c24400089.dsop)
c:RegisterEffect(e5)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(c24400089.bgmop)
c:RegisterEffect(e1)
end
function c24400089.bgmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(24400089,0))
end
c24400089.named_with_ZhanShuRenXing=true
c24400089.assault_name=24400042
c24400089.named_with_Xump45=true
function c24400089.tgtg(e,c)
return c:IsCode(24400019,24400020,24400025)
end
function c24400089.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE)~=0 then
return 1
else return 0 end
end
function c24400089.dscost(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 c24400089.dstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,0,1-tp,LOCATION_ONFIELD)
end
function c24400089.dsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
if g:GetCount()>0 then
local dg=g:Select(tp,1,2,nil)
Duel.Destroy(dg,REASON_EFFECT)
end
end
--战术人形-烙印系统
function c24400090.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c24400090.autg1)
e2:SetValue(500)
c:RegisterEffect(e2)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c24400090.autg2)
e2:SetValue(800)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--to hand
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(1)
e5:SetCost(c24400090.thcost)
e5:SetTarget(c24400090.thtg)
e5:SetOperation(c24400090.thop)
c:RegisterEffect(e5)
end
c24400090.named_with_ZhanShuRenXing=true
function c24400090.autg1(e,c)
return c.named_with_ZhanShuRenXing
end
function c24400090.autg2(e,c)
return c.named_with_TeZhanRenXing
end
function c24400090.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c24400090.thfil(c)
return c:IsAbleToHand() and c:IsType(TYPE_SPELL) and c.named_with_ZhanShuRenXing
end
function c24400090.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400090.thfil,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c24400090.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c24400090.thfil,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 then
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
--忤逆小队
function c24400091.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c24400091.target)
e1:SetValue(c24400091.indct)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetValue(c24400091.atkval)
c:RegisterEffect(e2)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400091,1))
e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,24400091)
e2:SetCondition(c24400091.discon)
e2:SetCost(c24400091.discost)
e2:SetTarget(c24400091.distg)
e2:SetOperation(c24400091.disop)
c:RegisterEffect(e2)
--counter
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(24400091,1))
e3:SetCategory(CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,33100091)
e3:SetCondition(c24400091.ctcon)
e3:SetTarget(c24400091.cttg)
e3:SetOperation(c24400091.ctop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e4)
end
c24400091.named_with_WuNiTeam=true
c24400091.named_with_ZhanShuRenXing=true
function c24400091.target(e,c)
return c:IsSetCard(0xf62) and c:IsFaceup()
end
function c24400091.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
return 1
else return 0 end
end
function c24400091.atkval(e)
local tp=e:GetHandlerPlayer()
return Duel.GetCounter(tp,LOCATION_SZONE,LOCATION_SZONE,0x1f65)*-400
end
function c24400091.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.IsChainNegatable(ev)
end
function c24400091.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x1f65,3,REASON_COST) end
Duel.RemoveCounter(tp,1,1,0x1f65,3,REASON_COST)
end
function c24400091.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function c24400091.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
function c24400091.cfilter2(c,tp)
return c:IsSummonPlayer(tp) and (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing) and c:IsFaceup()
end
function c24400091.ctcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c24400091.cfilter2,1,nil,tp)
end
function c24400091.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanAddCounter(0x1f65,2) end
end
function c24400091.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:AddCounter(0x1f65,2)
end
--云图计划-安东尼娜
local m=26100001
local cm=_G["c"..m]
function c26100001.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(cm.thcost)
e1:SetTarget(cm.cttg)
e1:SetOperation(cm.ctop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCondition(cm.atkcon)
e2:SetTarget(cm.atktg)
e2:SetValue(cm.adval)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,0))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLE_DESTROYED)
e4:SetCondition(cm.condition)
e4:SetTarget(cm.target)
e4:SetOperation(cm.operation)
c:RegisterEffect(e4)
end
--放置指示物
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function cm.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanAddCounter(0x1f81,1) end
if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,0x1f81,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x1f81,1)
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
tc:AddCounter(0x1f81,1)
end
end
--降低攻击力
function cm.atkcon(e,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
local a,d=Duel.GetBattleMonster(tp)
return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and a and d and a:IsSetCard(0xf80)
end
function cm.atktg(e,c)
local tp=e:GetHandlerPlayer()
local a,d=Duel.GetBattleMonster(tp)
return c==d
end
function cm.adval(e,c)
return -(c:GetCounter(0x1f81)*300)
end
--卡组检索
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
end
function cm.filter(c)
return c:IsSetCard(0xf80) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,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
\ No newline at end of file
--云图计划-帕斯卡
local m=26100002
local cm=_G["c"..m]
function c26100002.initial_effect(c)
c:SetUniqueOnField(1,0,m)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+200)
e3:SetTarget(cm.target)
e3:SetOperation(cm.operation)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetCountLimit(1,m+100)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(cm.discon)
e4:SetCost(cm.discost)
e4:SetTarget(cm.distg)
e4:SetOperation(cm.disop)
c:RegisterEffect(e4)
end
--检索
function cm.thfilter(c)
return c:IsSetCard(0xf80) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.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 cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local rt=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)*500
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Recover(p,rt,REASON_EFFECT)
end
--反击
function cm.actcfilter(c)
return c:IsSetCard(0xf80) and c:IsLocation(LOCATION_MZONE)
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,2000)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
and Duel.IsExistingMatchingCard(cm.actcfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
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 cm.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
\ No newline at end of file
--云图计划-巧可
local m=26100003
local cm=_G["c"..m]
function c26100003.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+200)
e3:SetCost(cm.thcost)
e3:SetTarget(cm.target)
e3:SetOperation(cm.operation)
c:RegisterEffect(e3)
end
--回血
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local rt=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)*500
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Recover(p,rt,REASON_EFFECT)
end
\ No newline at end of file
--云图计划-阿比盖尔
local m=26100004
local cm=_G["c"..m]
function c26100004.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(cm.sptg1)
e2:SetOperation(cm.spop1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
end
--手卡特招
function cm.spcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
--特招手卡
function cm.spfilter1(c,e,tp)
return c:IsLevelBelow(3) and c:IsOriginalSetCard(0xf80) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.spop1(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,cm.spfilter1,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
\ No newline at end of file
--云图计划-绿洲
local m=26100005
local cm=_G["c"..m]
function c26100005.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--level
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetValue(200)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xf80))
c:RegisterEffect(e3)
--Def
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e5:SetRange(LOCATION_SZONE)
e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xf80))
e5:SetValue(1)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_FZONE)
e6:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e6:SetCountLimit(1)
e6:SetValue(cm.valcon)
c:RegisterEffect(e6)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0xf80) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.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,aux.NecroValleyFilter(cm.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 cm.valcon(e,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0
end
\ No newline at end of file
--艾吉斯之盾
local m=26100006
local cm=_G["c"..m]
function c26100006.initial_effect(c)
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+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(-400)
c:RegisterEffect(e2)
--def down
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_EQUIP_LIMIT)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e7:SetValue(1)
c:RegisterEffect(e7)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_DEFENSE)
e3:SetValue(400)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetValue(1)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCondition(cm.recon)
e5:SetValue(LOCATION_HAND)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(m,0))
e6:SetCategory(CATEGORY_DAMAGE)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e6:SetCode(EVENT_BATTLE_DESTROYED)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetRange(LOCATION_SZONE)
e6:SetCondition(cm.damcon)
e6:SetTarget(cm.damtg)
e6:SetOperation(cm.damop)
c:RegisterEffect(e6)
end
function cm.filter(c)
return c:IsFaceup() and c:IsSetCard(0xf80)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
end
end
--离场回手
function cm.recon(e)
return e:GetHandler():IsFaceup()
end
--火焰翼人!
function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetEquipTarget()
local des=eg:GetFirst()
local rc=des:GetReasonCard()
return des:IsLocation(LOCATION_GRAVE) and des:IsType(TYPE_MONSTER) and rc:IsRelateToBattle() and rc==tc
end
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local damp=eg:GetFirst():GetPreviousControler()
local damg=eg:GetFirst():GetBaseAttack()
Duel.SetTargetPlayer(damp)
Duel.SetTargetParam(damg)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,damp,damg)
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local p,v=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,v,REASON_EFFECT)
end
\ No newline at end of file
--黑客入侵
local m=26100007
local cm=_G["c"..m]
function c26100007.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCountLimit(1)
e3:SetCost(cm.setcost)
e3:SetCondition(cm.discon)
e3:SetTarget(aux.nbtg)
e3:SetOperation(cm.activate)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(0,LOCATION_MZONE)
e4:SetValue(cm.val)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e5)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=re:GetHandler()
local g=Duel.SelectMatchingCard(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x1f81,1)
if re:IsActiveType(TYPE_SPELL+TYPE_MONSTER+TYPE_TRAP) then
g:GetFirst():AddCounter(0x1f81,1)
end
end
--效果无效
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and rp==1-tp
end
function cm.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x1f81,3,REASON_COST) end
Duel.RemoveCounter(tp,1,1,0x1f81,3,REASON_COST)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
if Duel.NegateEffect(ev) and tc:IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEDOWN,REASON_EFFECT)
end
end
--攻击力下降
function cm.val(e)
return Duel.GetCounter(0,1,1,0x1f81)*-400
end
\ No newline at end of file
--完形投影-安东尼娜
local m=26100008
local cm=_G["c"..m]
function c26100008.initial_effect(c)
aux.AddSynchroProcedure(c,cm.sfilter,aux.NonTuner(nil),1)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCountLimit(1,m)
e1:SetCost(cm.atkcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetDescription(aux.Stringid(m,2))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+100)
e2:SetCost(cm.setcost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+200)
e3:SetCost(cm.atkcost)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(80532587,1))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetTarget(cm.destg)
e4:SetOperation(cm.desop)
c:RegisterEffect(e4)
end
function cm.sfilter(c)
return c:IsSetCard(0xf80)
end
--攻击力下降
function cm.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x1f81,3,REASON_COST) end
Duel.RemoveCounter(tp,1,1,0x1f81,3,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
if g then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(math.ceil(tc:GetAttack()/2))
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(math.ceil(tc:GetDefense()/2))
tc:RegisterEffect(e2)
end
end
--放置木马指示物
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanAddCounter(0x1f81,4) end
if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,0x1f81,4) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x1f81,4)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
tc:AddCounter(0x1f81,4)
end
end
--不会被战破
function cm.filter(c)
return c:GetCounter(0x1f81)>0
end
function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local t=g:GetFirst()
while t do
t:RemoveCounter(tp,0x1f81,t:GetCounter(0x1f81),REASON_COST)
t=g:GetNext()
end
Duel.SetTargetCard(g)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e4:SetReset(RESET_PHASE+PHASE_END)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(cm.indtg)
e4:SetValue(cm.indct)
Duel.RegisterEffect(e4,tp)
end
function cm.indtg(e,c)
return c:IsSetCard(0xf80)
end
function cm.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
return 1
else return 0 end
end
\ No newline at end of file
--完形投影-帕斯卡
local m=26100009
local cm=_G["c"..m]
function c26100009.initial_effect(c)
aux.AddSynchroProcedure(c,cm.sfilter,aux.NonTuner(nil),1)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_RECOVER)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.descon)
e1:SetTarget(cm.rectg)
e1:SetOperation(cm.recop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_REVERSE_RECOVER)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetValue(1)
c:RegisterEffect(e2)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EFFECT_DESTROY_REPLACE)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetTarget(cm.reptg)
e5:SetValue(cm.repval)
e5:SetOperation(cm.repop)
c:RegisterEffect(e5)
end
function cm.sfilter(c)
return c:IsSetCard(0xf80)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.filter(c)
return c:IsFaceup() and c:GetAttack()>0
end
function cm.rectg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetFirst():GetAttack())
end
function cm.recop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetAttack()>0 then
Duel.Recover(tp,tc:GetAttack()/2,REASON_EFFECT)
end
end
--代替破坏
function cm.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
and c:IsSetCard(0xf80) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:GetFlagEffect(26100009)==0 and not c:IsReason(REASON_REPLACE)
end
function cm.desfilter(c,e,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE+LOCATION_HAND) and c:IsType(TYPE_MONSTER)
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED)
end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil,e,tp)
and eg:IsExists(cm.repfilter,1,nil,tp) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
local g=eg:Filter(cm.repfilter,nil,tp)
if g:GetCount()==1 then
e:SetLabelObject(g:GetFirst())
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local cg=g:Select(tp,1,1,nil)
e:SetLabelObject(cg:GetFirst())
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local tg=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil,e,tp)
Duel.SetTargetCard(tg)
tg:GetFirst():RegisterFlagEffect(26100009,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_CHAIN,0,1)
tg:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true)
return true
else return false end
end
function cm.repval(e,c)
return c==e:GetLabelObject()
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,26100009)
local tc=Duel.GetFirstTarget()
tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
end
--芙洛伦药物的副作用
local m=26100010
local cm=_G["c"..m]
local t={}
function c26100010.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetCondition(cm.reccon)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.reccon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local des=ev
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetDescription(aux.Stringid(m,1))
e1:SetOperation(cm.desop)
e1:SetCountLimit(1)
e1:SetLabel(des)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetDescription(aux.Stringid(m,2))
e2:SetCountLimit(1)
e2:SetCondition(cm.turncon)
e2:SetOperation(cm.turnop)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetDescription(aux.Stringid(m,3))
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCondition(cm.damgecon)
e3:SetOperation(cm.damgeop)
e3:SetCountLimit(1)
e3:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3)
Duel.RegisterEffect(e3,tp)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(aux.Stringid(m,1),0,m)
if ep==e:GetOwnerPlayer() then return end
local des=Duel.Recover(1-tp,e:GetLabel(),REASON_EFFECT)
table.insert(t,des)
end
function cm.turncon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function cm.turnop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(aux.Stringid(m,2),0,m)
Duel.RegisterFlagEffect(tp,26100010,RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,3)
local ct=Duel.GetFlagEffect(tp,26100010)
e:GetHandler():SetTurnCounter(ct)
if ct==3 then
e:GetOwner():ResetFlagEffect(26100010)
end
end
function cm.damgecon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetFlagEffect(tp,26100010)==3
end
function cm.damgeop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(aux.Stringid(m,3),0,m)
local ct=Duel.GetFlagEffect(tp,26100010)
local d1,d2,d3=table.unpack(t)
if ct==3 then
Duel.Damage(1-tp,d1+d2+d3,REASON_EFFECT)
e:GetOwner():ResetFlagEffect(26100010)
end
end
\ No newline at end of file
--沉寂之冬
local m=26100011
local cm=_G["c"..m]
function c26100011.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.condition)
e1:SetTarget(aux.nbtg)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCost(aux.bfgcost)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
--效果无效
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xf80) and c:IsType(TYPE_MONSTER)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
--卡组特招
function cm.filter(c,e,tp)
return c:IsSetCard(0xf80) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_GRAVE,0,3,nil)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter),tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if g:GetCount()<=0 then return end
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
tc:RegisterEffect(e2)
end
......@@ -100,13 +100,8 @@
!setname 0x941 混沌次元|非「混沌」
!counter 0x940 实验体指示物
<<<<<<< Updated upstream
#黑莲 1286875282 74
#cm.named_with_party_time 狂欢派对
=======
#黑莲 1286875282 74
#cm.named_with_party_time
>>>>>>> Stashed changes
#豚马 1033851949 82 0x210-0x21f
!setname 0x1212 架空
......@@ -619,16 +614,6 @@
#AddCodeList(24300021) 迦拉克隆记述
#AddCodeList(24300088) 礼品炸弹记述
#冥月凌 2102552959 244 0xf60-0xf6f
!setname 0xf60 战术人型
!setname 0xf61 特战人型
#named_with_ZhanShuRenXing 战术人型
#named_with_TeZhanRenXing 特战人型
!counter 0x1f64 归乡指示物
!counter 0x1f65 忤逆指示物
!counter 0x1f66 狼影指示物
!counter 0x1f67 伸冤者指示物
#饭饭 78254385 245 0x390-0x39f
!setname 0x9390 猛毒性
!counter 0x1391 辉光指示物
......@@ -637,14 +622,14 @@
!setname 0xb10 量子海妖
#cm.Plato 柏拉图水晶
#“米”雾中消失的X 257569726 257
#SetCard_MXHunHuang 昏黄
#格里芬生活部部长 2583980801 258 0x250-0x25f
!setname 0x251 战术少女
!setname 0x252 融合势力
!counter 0x251 过载指示物
#“米”雾中消失的X 257569726 257
#SetCard_MXHunHuang 昏黄
#逸轩 1246660891 266 0xe50-0xe5f
!setname 0xe51 颜彩
......@@ -1283,7 +1268,6 @@
!setname 0x67e 夏乡
!setname 0x367e 夏乡追忆
!setname 0x567e 夏乡净梦
#AddCodeList(67200161) 赛利卡·希露菲尔卡名记述
!counter 0x671 结缘指示物
!counter 0x1673 血指示物
......@@ -1554,25 +1538,6 @@
!setname 0x9a0 Virtual UP
!counter 0x9a0 Virtual指示物
#巧克力不做人 2803260801 960 0x280-0x28f
!setname 0x280 符斗祭
!setname 0x281 布偶
!setname 0x3282 世界异变
!setname 0x6282 闲暇时光
!setname 0x9282 困倦
!setname 0xa282 起床气
!setname 0xc282 安眠
!setname 0x3283 无心骑士
!setname 0x5283 捣乱宣言
!setname 0x6283 小不点
!setname 0x9283 束缚之瓶
!setname 0xa283 异星旅客
!setname 0x3284 双生永别
!setname 0x5284 无餍
!setname 0x6284 百花香
!setname 0x3285 高性能机动
!setname 0x6285 武装印花
#Jerry 1993043473 988 0xad0-0xadf
!setname 0xad0 超古代的
!setname 0xad2 萝卜-R
......@@ -1601,4 +1566,7 @@
!setname 0x87b 投影魔术
##樱彩 global:nep 732
#named_with_nep 海王星
##JustFish 840
##水叶 865
##巧克力不做人 2803260801 960
##虚子 3403728546 986
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