From 9afc049eca9ab9a3fff030c5b71d974efe6a9ff7 Mon Sep 17 00:00:00 2001 From: When <104731682+idk-what-to-name-here@users.noreply.github.com> Date: Wed, 16 Aug 2023 19:13:43 +0300 Subject: [PATCH 1/2] Add files via upload --- unofficial/c511027583.lua | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 unofficial/c511027583.lua diff --git a/unofficial/c511027583.lua b/unofficial/c511027583.lua new file mode 100644 index 0000000000..3b7017b994 --- /dev/null +++ b/unofficial/c511027583.lua @@ -0,0 +1,34 @@ +--幻げん木ぼく龍りゅう (Anime) +--Mythic Tree Dragon (Anime) +--Made by When +local s,id=GetID() +function s.initial_effect(c) + --Double Level + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1) + e1:SetCondition(s.condition) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +function s.cfilter(c) + return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) +end +function s.condition(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsFaceup() and c:IsRelateToEffect(e) then + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetRange(LOCATION_MZONE) + e1:SetCode(EFFECT_CHANGE_LEVEL) + e1:SetValue(c:GetLevel()*2) + e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + c:RegisterEffect(e1) + end +end From c92e9c03d965249a0a8e59988605f5227da038fb Mon Sep 17 00:00:00 2001 From: When <104731682+idk-what-to-name-here@users.noreply.github.com> Date: Mon, 28 Aug 2023 03:52:48 +0300 Subject: [PATCH 2/2] Update c511027583.lua --- unofficial/c511027583.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/unofficial/c511027583.lua b/unofficial/c511027583.lua index 3b7017b994..967ca31c1c 100644 --- a/unofficial/c511027583.lua +++ b/unofficial/c511027583.lua @@ -6,6 +6,7 @@ function s.initial_effect(c) --Double Level local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_LVCHANGE) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) @@ -17,18 +18,17 @@ function s.cfilter(c) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(s.cfilter),tp,LOCATION_MZONE,0,1,nil) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFaceup() and c:IsRelateToEffect(e) then - local e1=Effect.CreateEffect(c) + local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) + e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(c:GetLevel()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) c:RegisterEffect(e1) end end