Skip to content

Commit 62c8e21

Browse files
committed
added Delirium Polynea
1 parent 5897b3b commit 62c8e21

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

rush/c160020033.lua

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
--夢中のポリニア
2+
--Delirium Polynea
3+
--scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
local e1=Effect.CreateEffect(c)
7+
e1:SetDescription(aux.Stringid(id,0))
8+
e1:SetType(EFFECT_TYPE_IGNITION)
9+
e1:SetRange(LOCATION_MZONE)
10+
e1:SetCountLimit(1)
11+
e1:SetCondition(s.condition)
12+
e1:SetCost(s.cost)
13+
e1:SetTarget(s.target)
14+
e1:SetOperation(s.operation)
15+
c:RegisterEffect(e1)
16+
end
17+
function s.cfilter(c)
18+
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_INSECT) and c:IsFaceup()
19+
end
20+
function s.condition(e,tp,eg,ep,ev,re,r,rp)
21+
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
22+
end
23+
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
24+
local c=e:GetHandler()
25+
if chk==0 then return c:IsAttackPos() and c:IsCanChangePosition() end
26+
end
27+
function s.filter(c)
28+
return c:IsFaceup() and c:IsLevelAbove(3) and c:IsNotMaximumModeSide()
29+
end
30+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
31+
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_MZONE,1,nil) end
32+
end
33+
function s.insectfilter(c)
34+
return c:IsFaceup() and c:IsNotMaximumModeSide() and not c:IsRace(RACE_INSECT)
35+
end
36+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
37+
--Requirement
38+
local c=e:GetHandler()
39+
if Duel.ChangePosition(c,POS_FACEUP_DEFENSE,0,0,0)<1 then return end
40+
--Effect
41+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
42+
local g=Duel.SelectMatchingCard(tp,s.filter,tp,0,LOCATION_MZONE,1,1,nil)
43+
if #g>0 then
44+
Duel.HintSelection(g)
45+
g:GetFirst():UpdateLevel(-2,RESETS_STANDARD_PHASE_END,c)
46+
if Duel.IsExistingMatchingCard(s.insectfilter,tp,0,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
47+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO)
48+
local dg=Duel.SelectMatchingCard(tp,s.insectfilter,tp,0,LOCATION_MZONE,1,1,nil)
49+
Duel.HintSelection(dg)
50+
local e3=Effect.CreateEffect(c)
51+
e3:SetType(EFFECT_TYPE_SINGLE)
52+
e3:SetCode(EFFECT_CHANGE_RACE)
53+
e3:SetValue(RACE_INSECT)
54+
e3:SetReset(RESETS_STANDARD_PHASE_END,2)
55+
dg:GetFirst():RegisterEffect(e3)
56+
end
57+
end
58+
end

0 commit comments

Comments
 (0)