Skip to content

Commit

Permalink
Importing fixes from Ygopro Percy up to 20 Feb 2020
Browse files Browse the repository at this point in the history
  • Loading branch information
NaimSantos committed Feb 20, 2020
1 parent 6bb1f52 commit 88edddd
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 30 deletions.
11 changes: 3 additions & 8 deletions official/c12496261.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--ドラグニティナイト-ハールーン
--Dragunity Knight – Harloon
--Dragunity Knight – Luin
local s,id=GetID()
function s.initial_effect(c)
--synchro summon
Expand Down Expand Up @@ -49,7 +49,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
if c:IsFaceup() and c:IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e) then
aux.EquipByEffectAndLimitRegister(c,e,tp,tc)
end
end
Expand Down Expand Up @@ -81,7 +81,7 @@ function s.eqop2(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(s.eqlimit2)
e1:SetValue(true)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
--equip effect
Expand All @@ -96,8 +96,3 @@ function s.eqop2(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e3)
end
end
function s.eqlimit2(e,c)
local tp=e:GetHandlerPlayer()
return c:IsControler(tp)
end

2 changes: 1 addition & 1 deletion official/c13650422.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ end
s.listed_names={CARD_DARK_FUSION}
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function s.thfilter(c)
Expand Down
4 changes: 2 additions & 2 deletions official/c18175965.lua
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsStatus(STATUS_PROC_COMPLETE) end
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,tp,1)
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT)~=0 then
local ct=Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)
if ct>0 and c:IsRelateToEffect(e) then
if ct>0 and c:IsRelateToEffect(e) and c:IsStatus(STATUS_PROC_COMPLETE) then
Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)
end
end
Expand Down
7 changes: 3 additions & 4 deletions official/c24361622.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--天球の聖刻印
--Hieratic Seal of the Celestial Spheres
--Hieratic Seal of the Heavenly Spheres
--Scripted by Eerie Code
local s,id=GetID()
function s.initial_effect(c)
Expand All @@ -23,7 +23,7 @@ function s.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_RELEASE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id)
Expand Down Expand Up @@ -58,8 +58,7 @@ function s.spfilter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
Expand Down
2 changes: 1 addition & 1 deletion official/c36328300.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--究極宝玉陣
--Ultimate Crystal Formation
--Ultimate Crystal Magic
local s,id=GetID()
function s.initial_effect(c)
--activate
Expand Down
10 changes: 7 additions & 3 deletions official/c43641473.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function s.tcfilter(tc,ec)
return tc:IsFaceup() and ec:CheckEquipTarget(tc)
end
function s.ecfilter(c)
return c:IsType(TYPE_EQUIP) and c:GetEquipTarget()~=nil and Duel.IsExistingTarget(s.tcfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,c:GetEquipTarget(),c)
return c:IsType(TYPE_EQUIP) and (not c:IsOriginalType(TYPE_MONSTER) or c:IsOriginalType(TYPE_UNION)) and c:GetEquipTarget()~=nil and Duel.IsExistingTarget(s.tcfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,c:GetEquipTarget(),c)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
Expand All @@ -34,7 +34,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=g:GetFirst()
if tc==ec then tc=g:GetNext() end
if ec:IsFaceup() and ec:IsRelateToEffect(e) then
Duel.Equip(tp,ec,tc)
if ec:IsFaceup() and ec:IsRelateToEffect(e) then
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Equip(tp,ec,tc)
else
Duel.SendtoGrave(ec,REASON_EFFECT)
end
end
end
1 change: 1 addition & 0 deletions official/c71348837.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil)
if #g>0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:Select(tp,1,1,nil)
Duel.SSet(tp,sg)
Duel.ConfirmCards(1-tp,sg)
Expand Down
2 changes: 1 addition & 1 deletion official/c74665651.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@ function s.atfilter(c)
end
function s.atlimit(e,c)
local g=Duel.GetMatchingGroup(s.atfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)
return c:IsFaceup() and c:IsSetCard(0x131) and g:GetMaxGroup(Card.GetLevel):IsContains(c)
return c:IsFaceup() and c:IsSetCard(0x131) and not g:GetMaxGroup(Card.GetLevel):IsContains(c)
end
1 change: 1 addition & 0 deletions official/c77297908.lua
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ function s.desfilter(c)
return c:IsFacedown() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Expand Down
11 changes: 5 additions & 6 deletions official/c81263643.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--幻姫フルドラ
--Mystic Huldra
--Mystrick Hulder
--Scripted by Eerie Code
local s,id=GetID()
function s.initial_effect(c)
Expand All @@ -8,15 +8,15 @@ function s.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function s.cfilter(c,tp)
if not c:IsDiscardable() then return false end
Expand Down Expand Up @@ -48,4 +48,3 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end

5 changes: 1 addition & 4 deletions official/c83152482.lua
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,11 @@ function s.equipop(c,e,tp,tc)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(s.eqlimit)
e2:SetValue(true)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
return true
end
function s.eqlimit(e,c)
return c:GetControler()==e:GetHandlerPlayer()
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsCode(e:GetLabel())
end
Expand Down

0 comments on commit 88edddd

Please sign in to comment.