Commit 0207b5a6 authored by mercury233's avatar mercury233

add new cards

parent 8c975d67
#created by ...
#main
101102009
101102054
101102064
101102079
101102063
100269001
100415024
......@@ -14,7 +18,6 @@
100415034
100415035
100415036
100200187
100311002
100311003
101102006
......@@ -32,9 +35,6 @@
101102070
101102071
101102072
100200184
100200185
100200186
100311001
100311026
101102001
......@@ -58,6 +58,7 @@
101102074
101102076
#extra
101102031
101102050
101102035
101102036
......@@ -77,3 +78,7 @@
100267001
100267002
100267003
100200184
100200185
100200186
100200187
......@@ -15,7 +15,6 @@ function c100415029.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ATTACK_ALL)
e2:SetValue(1)
e2:SetCondition(c100415029.atkcon)
e2:SetValue(c100415029.atkfilter)
c:RegisterEffect(e2)
......
......@@ -4,7 +4,7 @@
function c101102001.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101102001,1))
e1:SetDescription(aux.Stringid(101102001,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
......
--教導の神徒
--Scripted by mallu11
function c101102009.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101102009,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101102009)
e1:SetCondition(c101102009.spcon)
e1:SetTarget(c101102009.sptg)
e1:SetOperation(c101102009.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101102009,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,101102109)
e2:SetCondition(c101102009.thcon)
e2:SetTarget(c101102009.thtg)
e2:SetOperation(c101102009.thop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101102009,2))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,101102209)
e3:SetCondition(c101102009.atkcon)
e3:SetTarget(c101102009.atktg)
e3:SetOperation(c101102009.atkop)
c:RegisterEffect(e3)
end
function c101102009.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsType,1,nil,TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
end
function c101102009.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101102009.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)
end
end
function c101102009.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND)
end
function c101102009.thfilter(c)
return c:IsSetCard(0x145) and not c:IsCode(101102009) and c:IsAbleToHand()
end
function c101102009.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101102009.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101102009.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101102009.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c101102009.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function c101102009.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
function c101102009.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x145)
end
function c101102009.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101102009.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function c101102009.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c101102009.atkfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(500)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
--痕喰竜ブリガンド
--Scripted by mallu11
function c101102031.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,68468459,aux.FilterBoolFunction(Card.IsLevelAbove,8),1,true,true)
--indes battle
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCondition(c101102031.imcon)
e2:SetOperation(c101102031.imop)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetOperation(c101102031.regop)
c:RegisterEffect(e3)
--to hand/spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101102031,0))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,101102031)
e4:SetCondition(c101102031.thcon)
e4:SetTarget(c101102031.thtg)
e4:SetOperation(c101102031.thop)
c:RegisterEffect(e4)
end
function c101102031.imcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c101102031.imop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c101102031.imval)
e1:SetValue(c101102031.imfilter)
c:RegisterEffect(e1)
end
function c101102031.imval(e,c)
return c~=e:GetHandler()
end
function c101102031.imfilter(e,re,rp)
return aux.tgoval(e,re,rp) and re:IsActiveType(TYPE_MONSTER)
end
function c101102031.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(101102031,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function c101102031.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(101102031)>0
end
function c101102031.thfilter(c,e,tp)
if not (c:IsSetCard(0x24f) and c:IsType(TYPE_MONSTER) or c:IsCode(68468459)) then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function c101102031.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101102031.thfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK)
end
function c101102031.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c101102031.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tc=g:GetFirst()
if tc then
if tc:IsAbleToHand() and (not tc:IsCanBeSpecialSummoned(e,0,tp,false,false) or ft<=0 or Duel.SelectOption(tp,1190,1152)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
......@@ -8,20 +8,24 @@ function c101102053.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,101102053+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101102053.sptg)
e1:SetOperation(c101102053.spop)
c:RegisterEffect(e1)
end
function c101102053.spfilter1(c,e,tp)
return c:IsFaceup() and c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST) and Duel.IsExistingMatchingCard(c101102053.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetAttack(),c:GetRace())
return c:IsFaceup() and c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST)
and Duel.IsExistingMatchingCard(c101102053.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetAttack(),c:GetRace())
end
function c101102053.spfilter2(c,e,tp,atk,race)
return c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST) and c:IsAttackBelow(atk) and not c:IsRace(race) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
return c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST) and c:IsAttackBelow(atk) and not c:IsRace(race)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c101102053.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c101102053.spfilter1(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp)>0 and Duel.IsExistingTarget(c101102053.spfilter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingTarget(c101102053.spfilter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c101102053.spfilter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
......
--教導神理
--Scripted by mallu11
function c101102054.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(c101102054.target)
e1:SetOperation(c101102054.operation)
c:RegisterEffect(e1)
--atk up/down
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(c101102054.atkval)
c:RegisterEffect(e2)
--draw
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101102054,0))
e4:SetCategory(CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,101102054)
e4:SetCondition(c101102054.tgcon)
e4:SetTarget(c101102054.tgtg)
e4:SetOperation(c101102054.tgop)
c:RegisterEffect(e4)
--Equip limit
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_EQUIP_LIMIT)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetValue(1)
c:RegisterEffect(e5)
end
function c101102054.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 c101102054.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 c101102054.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x145)
end
function c101102054.atkval(e,c)
if c:IsSetCard(0x145) then
return c:GetLevel()*100
else
return Duel.GetMatchingGroupCount(c101102054.atkfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)*-200
end
end
function c101102054.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=c:GetPreviousEquipTarget()
return ec and c:IsReason(REASON_LOST_TARGET) and ec:IsReason(REASON_DESTROY)
end
function c101102054.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA)
end
function c101102054.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_EXTRA,0,1,1,nil)
if #g>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
......@@ -8,13 +8,13 @@ function c101102055.initial_effect(c)
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_TOGRAVE+CATEGORY_ATKCHANGE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,10110205596540+EFFECT_COUNT_CODE_OATH)
e1:SetCountLimit(1,101102055+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101102055.target)
e1:SetOperation(c101102055.activate)
c:RegisterEffect(e1)
end
function c101102055.tffilter(c,tp)
return c:IsSetCard(0x124e) and not c:IsType(TYPE_FIELD+TYPE_MONSTER) and not c:IsForbidden()
return c:IsSetCard(0x124e) and not c:IsType(TYPE_FIELD+TYPE_MONSTER) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function c101102055.gtfilter(c)
return c:IsSetCard(0x124e) and c:IsFaceup()
......@@ -46,14 +46,13 @@ function c101102055.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,c101102055.tffilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then
if Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)~=0 then
if Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local gc=Duel.GetMatchingGroupCount(c101102055.gtfilter,tp,LOCATION_ONFIELD,0,nil)
if gc>=2 and Duel.SelectYesNo(tp,aux.Stringid(101102055,1)) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x24e))
e1:SetValue(200)
......
--アルカナリーディング
--
--Script by mercury233
--not fully implemented
function c101102064.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101102064,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101102064)
e1:SetTarget(c101102064.target)
e1:SetOperation(c101102064.activate)
c:RegisterEffect(e1)
--summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101102064,1))
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101102064+100)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c101102064.sumtg)
e2:SetOperation(c101102064.sumop)
c:RegisterEffect(e2)
end
c101102064.toss_coin=true
function c101102064.thfilter1(c)
return not c:IsCode(101102064) and c.toss_coin and c:IsAbleToHand()
end
function c101102064.thfilter2(c,p)
return c:IsAbleToHand(p)
end
function c101102064.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101102064.thfilter1,tp,LOCATION_DECK,0,1,nil)
or Duel.IsExistingMatchingCard(c101102064.thfilter2,tp,0,LOCATION_DECK,1,nil,1-tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,PLAYER_ALL,LOCATION_DECK)
end
function c101102064.activate(e,tp,eg,ep,ev,re,r,rp)
local res
if Duel.IsEnvironment(73206827,tp,LOCATION_FZONE) then
local off=1
local ops={}
local opval={}
if Duel.IsExistingMatchingCard(c101102064.thfilter1,tp,LOCATION_DECK,0,1,nil) then
ops[off]=aux.Stringid(101102064,2)
opval[off-1]=0
off=off+1
end
if Duel.IsExistingMatchingCard(c101102064.thfilter2,tp,0,LOCATION_DECK,1,nil,1-tp) then
ops[off]=aux.Stringid(101102064,3)
opval[off-1]=1
off=off+1
end
if off==1 then return end
local op=Duel.SelectOption(tp,table.unpack(ops))
res=opval[op]
else
res=1-Duel.TossCoin(tp,1)
end
if res==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101102064.thfilter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
else
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(1-tp,c101102064.thfilter2,1-tp,LOCATION_DECK,0,1,1,nil,1-tp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
end
function c101102064.sumfilter(c)
return c:IsSetCard(0x5) and c:IsSummonable(true,nil)
end
function c101102064.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101102064.sumfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c101102064.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c101102064.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
......@@ -12,30 +12,46 @@ function c101102070.initial_effect(c)
e1:SetOperation(c101102070.activate)
c:RegisterEffect(e1)
end
function c101102070.spfilter1(c,e,tp)
return c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
function c101102070.spfilter(c,e,tp)
return c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
function c101102070.fselect1(g,tp)
function c101102070.fselect(g,tp)
return Duel.IsExistingMatchingCard(c101102070.lkfilter,tp,LOCATION_EXTRA,0,1,nil,g)
end
function c101102070.lkfilter(c,g)
return c:IsSetCard(0x24f) and c:IsLinkSummonable(g,nil,g:GetCount(),g:GetCount())
end
function c101102070.chkfilter(c,tp)
return c:IsType(TYPE_LINK) and c:IsSetCard(0x24f) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c101102070.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetMatchingGroup(c101102070.spfilter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
if chk==0 then return ft>0 and Duel.IsPlayerCanSpecialSummonCount(tp,2) and g:CheckSubGroup(c101102070.fselect1,1,ft,tp) end
if chk==0 then
if not Duel.IsPlayerCanSpecialSummonCount(tp,2) then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return false end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local cg=Duel.GetMatchingGroup(c101102070.chkfilter,tp,LOCATION_EXTRA,0,nil,tp)
if #cg==0 then return false end
local _,maxlink=cg:GetMaxGroup(Card.GetLink)
if maxlink>ft then maxlink=ft end
local g=Duel.GetMatchingGroup(c101102070.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
return g:CheckSubGroup(c101102070.fselect,1,maxlink,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c101102070.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101102070.spfilter1),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
if ft>0 then
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101102070.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
local cg=Duel.GetMatchingGroup(c101102070.chkfilter,tp,LOCATION_EXTRA,0,nil,tp)
local _,maxlink=cg:GetMaxGroup(Card.GetLink)
if ft>0 and maxlink then
if maxlink>ft then maxlink=ft end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c101102070.fselect1,false,1,ft,tp)
local sg=g:SelectSubGroup(tp,c101102070.fselect,false,1,maxlink,tp)
if not sg then return end
local tc=sg:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
......@@ -55,7 +71,7 @@ function c101102070.activate(e,tp,eg,ep,ev,re,r,rp)
if og:GetCount()==sg:GetCount() and tg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local rg=tg:Select(tp,1,1,nil)
Duel.LinkSummon(tp,rg:GetFirst(),og)
Duel.LinkSummon(tp,rg:GetFirst(),og,nil,#og,#og)
end
end
end
......@@ -6,7 +6,6 @@ function c101102072.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_MSET)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
......@@ -16,7 +15,7 @@ function c101102072.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,101102072)
e2:SetTarget(c101102072.target)
e2:SetOperation(c101102072.operation)
......@@ -55,8 +54,8 @@ function c101102072.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,2,2)
if sg then
Duel.HintSelection(sg)
if Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)~=0 and sg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) and tc:IsRelateToEffect(e) then
if Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)~=0 and sg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA)
and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
......
--魔獣の大餌
--Scripted by mallu11
function c101102079.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(c101102079.target)
e1:SetOperation(c101102079.activate)
c:RegisterEffect(e1)
end
function c101102079.rmfilter(c)
return c:IsFacedown() and c:IsAbleToRemove()
end
function c101102079.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,1,nil,tp,POS_FACEDOWN)
and Duel.IsExistingMatchingCard(c101102079.rmfilter,tp,0,LOCATION_EXTRA,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,PLAYER_ALL,LOCATION_EXTRA)
end
function c101102079.activate(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,nil,tp,POS_FACEDOWN)
local g2=Duel.GetMatchingGroup(c101102079.rmfilter,tp,0,LOCATION_EXTRA,nil)
if #g1>0 and #g2>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg1=g1:Select(tp,1,#g2,nil)
if Duel.Remove(sg1,POS_FACEDOWN,REASON_EFFECT)~=0 and sg1:IsExists(Card.IsLocation,1,nil,LOCATION_REMOVED) then
local og1=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_REMOVED)
local sg2=g2:RandomSelect(tp,#og1)
if Duel.Remove(sg2,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)~=0 and sg2:IsExists(Card.IsLocation,1,nil,LOCATION_REMOVED) then
local c=e:GetHandler()
local fid=c:GetFieldID()
local og2=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_REMOVED)
local tc=og2:GetFirst()
while tc do
tc:RegisterFlagEffect(101102079,RESET_EVENT+RESETS_STANDARD,0,1,fid)
tc=og2:GetNext()
end
og2:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetLabel(fid)
e1:SetLabelObject(og2)
e1:SetCountLimit(1)
e1:SetCondition(c101102079.retcon)
e1:SetOperation(c101102079.retop)
Duel.RegisterEffect(e1,tp)
end
end
end
end
function c101102079.retfilter(c,fid)
return c:GetFlagEffectLabel(101102079)==fid
end
function c101102079.retcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(c101102079.retfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c101102079.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(c101102079.retfilter,nil,e:GetLabel())
Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment