Skip to content

Commit 266f82f

Browse files
authored
added new rush scripts (#890)
1 parent d8d034e commit 266f82f

File tree

3 files changed

+135
-0
lines changed

3 files changed

+135
-0
lines changed

rush/c160012056.lua

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
--トランザム・ライトニング
2+
--Transamu Lightning
3+
--scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--battle protection
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetType(EFFECT_TYPE_ACTIVATE)
9+
e1:SetCategory(CATEGORY_POSITION)
10+
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
11+
e1:SetProperty(EFFECT_FLAG_DELAY)
12+
e1:SetCondition(s.condition)
13+
e1:SetTarget(s.target)
14+
e1:SetOperation(s.activate)
15+
c:RegisterEffect(e1)
16+
end
17+
function s.condition(e,tp,eg,ep,ev,re,r,rp)
18+
local tc=Duel.GetAttackTarget()
19+
local ac=Duel.GetAttacker()
20+
return tc and tc:IsFaceup() and tc:IsControler(tp) and ac:IsControler(1-tp)
21+
and tc:IsLevelBelow(4) and tc:IsType(TYPE_NORMAL) and tc:IsRace(RACE_GALAXY) and not tc:IsHasEffect(EFFECT_INDESTRUCTABLE_BATTLE)
22+
end
23+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
24+
local tg=Duel.GetAttackTarget()
25+
if chk==0 then return tg:IsControler(tp) and tg:IsOnField() end
26+
end
27+
function s.activate(e,tp,eg,ep,ev,re,r,rp)
28+
--Effect
29+
local d=Duel.GetAttackTarget()
30+
if d and d:IsRelateToBattle() and d:IsFaceup() then
31+
--Cannot be destroyed by battle
32+
local e1=Effect.CreateEffect(e:GetHandler())
33+
e1:SetDescription(3000)
34+
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
35+
e1:SetType(EFFECT_TYPE_SINGLE)
36+
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
37+
e1:SetValue(1)
38+
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
39+
d:RegisterEffectRush(e1)
40+
end
41+
end

rush/c160012057.lua

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
--ジョインテック・グレートウォール
2+
--Jointech Great Wall
3+
--scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Increase ATK
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetCategory(CATEGORY_ATKCHANGE)
9+
e1:SetType(EFFECT_TYPE_ACTIVATE)
10+
e1:SetCode(EVENT_SUMMON_SUCCESS)
11+
e1:SetProperty(EFFECT_FLAG_DELAY)
12+
e1:SetCondition(s.condition)
13+
e1:SetTarget(s.target)
14+
e1:SetOperation(s.activate)
15+
c:RegisterEffect(e1)
16+
end
17+
function s.filter1(c,tp)
18+
return c:IsSummonPlayer(1-tp) and c:IsLocation(LOCATION_MZONE) and c:IsLevelAbove(7)
19+
end
20+
function s.cfilter(c)
21+
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsLevelAbove(7)
22+
end
23+
function s.condition(e,tp,eg,ep,ev,re,r,rp)
24+
return eg:IsExists(s.filter1,1,nil,tp) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
25+
end
26+
function s.filter(c)
27+
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH)
28+
end
29+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
30+
if chk==0 then return Duel.IsExistingMatchingCard(aux.FilterMaximumSideFunctionEx(s.filter),tp,LOCATION_MZONE,0,1,nil) end
31+
end
32+
function s.activate(e,tp,eg,ep,ev,re,r,rp)
33+
local c=e:GetHandler()
34+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
35+
--Effect
36+
local g=Duel.SelectMatchingCard(tp,aux.FilterMaximumSideFunctionEx(s.filter),tp,LOCATION_MZONE,0,1,3,nil)
37+
if #g==0 then return end
38+
Duel.HintSelection(g,true)
39+
for tc in g:Iter() do
40+
local e1=Effect.CreateEffect(c)
41+
e1:SetType(EFFECT_TYPE_SINGLE)
42+
e1:SetCode(EFFECT_UPDATE_ATTACK)
43+
e1:SetValue(300)
44+
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
45+
tc:RegisterEffectRush(e1)
46+
--Cannot be destroyed by battle
47+
local e2=Effect.CreateEffect(e:GetHandler())
48+
e2:SetDescription(3000)
49+
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
50+
e2:SetType(EFFECT_TYPE_SINGLE)
51+
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
52+
e2:SetValue(1)
53+
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
54+
tc:RegisterEffectRush(e2)
55+
end
56+
end

rush/c160012058.lua

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
--アドバンス・ブロック
2+
--Tribute Block
3+
--scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Activate
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetCategory(CATEGORY_POSITION)
9+
e1:SetType(EFFECT_TYPE_ACTIVATE)
10+
e1:SetCode(EVENT_SUMMON_SUCCESS)
11+
e1:SetCondition(s.condition)
12+
e1:SetTarget(s.target)
13+
e1:SetOperation(s.operation)
14+
c:RegisterEffect(e1)
15+
end
16+
function s.condition(e,tp,eg,ep,ev,re,r,rp)
17+
if #eg~=1 then return false end
18+
local tc=eg:GetFirst()
19+
return tc:IsFaceup() and tc:IsLevelAbove(5) and tc:IsCanChangePositionRush() and tc:IsSummonPlayer(1-tp)
20+
end
21+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
22+
if chk==0 then return Duel.IsExistingMatchingCard(s.posfilter,tp,LOCATION_MZONE,0,1,nil) end
23+
local g=Duel.GetMatchingGroup(s.posfilter,tp,LOCATION_MZONE,0,nil)
24+
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
25+
Duel.SetOperationInfo(0,CATEGORY_POSITION,eg:GetFirst(),1,0,0)
26+
end
27+
function s.posfilter(c)
28+
return c:IsAttackPos() and c:IsRace(RACE_DRAGON+RACE_MACHINE) and c:IsCanChangePositionRush()
29+
end
30+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
31+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
32+
local g=Duel.SelectMatchingCard(tp,s.posfilter,tp,LOCATION_MZONE,0,1,1,nil)
33+
if #g<1 then return end
34+
Duel.HintSelection(g,true)
35+
g:AddCard(eg)
36+
--effect
37+
Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
38+
end

0 commit comments

Comments
 (0)