Skip to content

Commit

Permalink
added new rush cards
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoshi80 committed Jan 20, 2025
1 parent 1711f75 commit d86b2a0
Show file tree
Hide file tree
Showing 9 changed files with 381 additions and 0 deletions.
42 changes: 42 additions & 0 deletions rush/c160020026.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
--アニマジカ・トレーダー
--Animagica Trader
--Scripted by YoshiDuels
local s,id=GetID()
function s.initial_effect(c)
--Set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsStatus(STATUS_SUMMON_TURN|STATUS_SPSUMMON_TURN)
end
function s.thfilter(c)
return c:IsCode(160020056,160020057) and c:IsAbleToHand()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--Effect
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_GRAVE,0,nil)
local tg=aux.SelectUnselectGroup(sg,1,tp,1,2,s.rescon,1,tp)
local ct=Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
if c:IsAbleToGrave() and ct==2 then
Duel.SendtoGrave(c,REASON_EFFECT)
end
end
function s.rescon(sg,e,tp,mg)
return sg:FilterCount(Card.IsCode,nil,160020056)<2 and sg:FilterCount(Card.IsCode,nil,160020057)<2
end
49 changes: 49 additions & 0 deletions rush/c160020027.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
--アニマジカ・トレーダー
--Animagica Gardna
--Scripted by YoshiDuels
local s,id=GetID()
function s.initial_effect(c)
-- Mill and add to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(s.condition)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsStatus(STATUS_SUMMON_TURN|STATUS_SPSUMMON_TURN)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function s.thfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST) and c:IsLevel(7,8) and c:IsDefenseAbove(1500) and c:IsAbleToHand()
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
--Requirement
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
--Effect
if Duel.DiscardDeck(tp,3,REASON_EFFECT)<1 then return end
if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
Duel.BreakEffect()
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
30 changes: 30 additions & 0 deletions rush/c160020028.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
--アニマジカ・ソーサラー
--Animagica Sorcerer
--Scripted by YoshiDuels
local s,id=GetID()
function s.initial_effect(c)
--Atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_BEAST))
e1:SetValue(400)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e2)
--lv up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_LEVEL)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(s.target)
e3:SetValue(2)
c:RegisterEffect(e3)
end
function s.target(e,c)
return c:IsRace(RACE_BEAST) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
30 changes: 30 additions & 0 deletions rush/c160020029.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
--アニマジカ・ナイト
--Animagica Knight
--Scripted by YoshiDuels
local s,id=GetID()
function s.initial_effect(c)
--Face-up Beast monsters you control cannot be destroyed by your opponent's effects
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(s.indtg)
e1:SetValue(aux.indoval)
c:RegisterEffect(e1)
--lv up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_LEVEL)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(s.target)
e2:SetValue(2)
c:RegisterEffect(e2)
end
function s.indtg(e,c)
return c:IsFaceup() and c:IsRace(RACE_BEAST)
end
function s.target(e,c)
return c:IsRace(RACE_BEAST) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
49 changes: 49 additions & 0 deletions rush/c160020030.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
--アニマジカ・ダブルセイバー
--Animagica Double Saber
--Scripted by YoshiDuels
local s,id=GetID()
function s.initial_effect(c)
--Prevent the activation of Traps when you Summon a Beast
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(s.sucop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_CHAIN_END)
e3:SetOperation(s.cedop2)
c:RegisterEffect(e3)
--lv up
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_UPDATE_LEVEL)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(s.target)
e4:SetValue(2)
c:RegisterEffect(e4)
end
function s.sucfilter(c,tp)
return c:IsRace(RACE_BEAST) and c:IsFaceup() and c:IsControler(tp)
end
function s.sucop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(s.sucfilter,1,nil,tp) then
Duel.SetChainLimit(s.chainlm)
end
end
function s.cedop2(e,tp,eg,ep,ev,re,r,rp)
local _,g=Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS,true)
if g and g:IsExists(s.sucfilter,1,nil,tp) and Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS) then
Duel.SetChainLimitTillChainEnd(s.chainlm)
end
end
function s.chainlm(e,rp,tp)
return tp==rp or (e:IsTrapEffect() and not e:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function s.target(e,c)
return c:IsRace(RACE_BEAST) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
56 changes: 56 additions & 0 deletions rush/c160020031.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
--アニマジカ・ウィップ
--Animagica Whip
--Scripted by YoshiDuels
local s,id=GetID()
function s.initial_effect(c)
--Summon with 1 tribute
local e1=aux.AddNormalSummonProcedure(c,true,true,1,1,SUMMON_TYPE_TRIBUTE,aux.Stringid(id,0),s.otfilter)
--Reduce ATK
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
end
function s.otfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT)
end
function s.cfilter(c)
return c:IsRace(RACE_BEAST) and c:IsAbleToDeckOrExtraAsCost()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
end
function s.filter(c,lvl)
return c:IsFaceup() and c:GetLevel()<lvl and c:IsNotMaximumModeSide()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_MZONE,1,nil,e:GetHandler():GetLevel()) end
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,nil,1,tp,-600)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--Requirement
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if #g==0 then return end
Duel.HintSelection(g)
if Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_COST)==0 then return end
--Effect
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,0,LOCATION_MZONE,1,1,nil,c:GetLevel())
if #g>0 then
Duel.HintSelection(g)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-2000)
e1:SetReset(RESETS_STANDARD_PHASE_END)
g:GetFirst():RegisterEffect(e1)
end
end
48 changes: 48 additions & 0 deletions rush/c160020032.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
--アニマジカ・シューター
--Animagica Shooter
--Scripted by YoshiDuels
local s,id=GetID()
function s.initial_effect(c)
--Summon with 1 tribute
local e1=aux.AddNormalSummonProcedure(c,true,true,1,1,SUMMON_TYPE_TRIBUTE,aux.Stringid(id,0),s.otfilter)
--Change monster's battle position
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(s.condition)
e2:SetTarget(s.target)
e2:SetOperation(s.operation)
c:RegisterEffect(e2)
end
function s.otfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsStatus(STATUS_SUMMON_TURN|STATUS_SPSUMMON_TURN)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanChangePositionRush,tp,0,LOCATION_MZONE,1,nil) end
end
function s.desfilter(c,lvl)
return c:IsFaceup() and c:GetLevel()<lvl
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
--Effect
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,Card.IsCanChangePositionRush,tp,0,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(g)
Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil,e:GetHandler():GetLevel())
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=g:Select(tp,1,1,nil)
if #sg==0 then return end
sg=sg:AddMaximumCheck()
Duel.HintSelection(sg)
Duel.BreakEffect()
Duel.Destroy(sg,REASON_EFFECT)
end
end
48 changes: 48 additions & 0 deletions rush/c160020056.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
--アニマジカ・コイン
--Animagica Coin
--Scripted by YoshiDuels
local s,id=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_MZONE)
end
function s.thfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST) and c:IsLevel(7,8) and c:IsDefenseAbove(1500) and c:IsAbleToHand()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
--Effect
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_MZONE,0,1,1,nil)
Duel.HintSelection(g)
if Duel.SendtoGrave(g,REASON_EFFECT)==0 then return end
if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(s.aclimit)
e1:SetReset(RESET_PHASE|PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.aclimit(e,re,tp)
return re:IsMonsterEffect() and re:GetHandler():GetOriginalLevel()<=6
end
29 changes: 29 additions & 0 deletions rush/c160020057.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
--アニマジカ・シールド
--Animagica Shield
--Scripted by YoshiDuels
local s,id=GetID()
function s.initial_effect(c)
--equip
aux.AddEquipProcedure(c,0,s.eqfilter,s.eqlimit)
--atk/def up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(600)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
--level up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_LEVEL)
e3:SetValue(3)
c:RegisterEffect(e3)
end
function s.eqfilter(c)
return c:IsFaceup() and c:IsRace(RACE_BEAST) and c:IsAttribute(ATTRIBUTE_LIGHT) and not c:IsMaximumModeSide()
end
function s.eqlimit(e,c)
return c:IsFaceup()
end

0 comments on commit d86b2a0

Please sign in to comment.