Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts-888
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
ygopro-scripts-888
Commits
e544b93a
Commit
e544b93a
authored
Jan 23, 2022
by
salix5
Committed by
GitHub
Jan 23, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix EFFECT_SWAP_BASE_AD (#1790)
parent
93471152
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
11 deletions
+59
-11
c26775203.lua
c26775203.lua
+8
-1
c44139064.lua
c44139064.lua
+23
-6
c52097679.lua
c52097679.lua
+8
-1
c73648243.lua
c73648243.lua
+9
-1
c92736188.lua
c92736188.lua
+11
-2
No files found.
c26775203.lua
View file @
e544b93a
...
...
@@ -39,9 +39,16 @@ function c26775203.operation(e,tp,eg,ep,ev,re,r,rp)
end
function
c26775203
.
adchange
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
batk
=
c
:
GetBaseAttack
()
local
bdef
=
c
:
GetBaseDefense
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SWAP_BASE_AD
)
e1
:
SetCode
(
EFFECT_SET_BASE_ATTACK_FINAL
)
e1
:
SetValue
(
bdef
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SET_BASE_DEFENSE_FINAL
)
e2
:
SetValue
(
batk
)
c
:
RegisterEffect
(
e2
)
end
c44139064.lua
View file @
e544b93a
...
...
@@ -27,6 +27,7 @@ function c44139064.initial_effect(c)
e3
:
SetCountLimit
(
1
,
44139065
)
e3
:
SetCondition
(
c44139064
.
atkcon
)
e3
:
SetCost
(
c44139064
.
atkcost
)
e3
:
SetTarget
(
c44139064
.
atktg
)
e3
:
SetOperation
(
c44139064
.
atkop
)
c
:
RegisterEffect
(
e3
)
Duel
.
AddCustomActivityCounter
(
44139064
,
ACTIVITY_SPSUMMON
,
c44139064
.
counterfilter
)
...
...
@@ -96,14 +97,30 @@ function c44139064.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c44139064
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
a
=
Duel
.
GetAttacker
()
if
not
a
:
IsControler
(
tp
)
then
a
=
Duel
.
GetAttackTarget
()
end
Duel
.
SetTargetCard
(
a
)
end
function
c44139064
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetAttacker
()
if
tc
:
IsControler
(
1
-
tp
)
then
tc
=
Duel
.
GetAttackTarget
()
end
if
tc
:
IsRelateToBattle
()
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
c
=
e
:
GetHandler
()
local
tg
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
tc
=
tg
:
GetFirst
()
if
tc
:
IsRelateToBattle
()
and
tc
:
IsControler
(
1
-
tp
)
then
local
batk
=
tc
:
GetBaseAttack
()
local
bdef
=
tc
:
GetBaseDefense
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SWAP_BASE_AD
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE
)
e1
:
SetCode
(
EFFECT_SET_BASE_ATTACK_FINAL
)
e1
:
SetValue
(
bdef
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_DAMAGE_CAL
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SET_BASE_DEFENSE_FINAL
)
e2
:
SetValue
(
batk
)
tc
:
RegisterEffect
(
e2
)
end
end
c52097679.lua
View file @
e544b93a
...
...
@@ -23,11 +23,18 @@ function c52097679.activate(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
tc
=
sg
:
GetFirst
()
while
tc
do
local
batk
=
tc
:
GetBaseAttack
()
local
bdef
=
tc
:
GetBaseDefense
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SWAP_BASE_AD
)
e1
:
SetCode
(
EFFECT_SET_BASE_ATTACK_FINAL
)
e1
:
SetValue
(
bdef
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SET_BASE_DEFENSE_FINAL
)
e2
:
SetValue
(
batk
)
tc
:
RegisterEffect
(
e2
)
tc
=
sg
:
GetNext
()
end
end
c73648243.lua
View file @
e544b93a
...
...
@@ -23,12 +23,20 @@ function c73648243.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function
c73648243
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
batk
=
c
:
GetBaseAttack
()
local
bdef
=
c
:
GetBaseDefense
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummonStep
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SWAP_BASE_AD
)
e1
:
SetCode
(
EFFECT_SET_BASE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetValue
(
bdef
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SET_BASE_DEFENSE
)
e2
:
SetValue
(
batk
)
c
:
RegisterEffect
(
e2
)
end
Duel
.
SpecialSummonComplete
()
end
c92736188.lua
View file @
e544b93a
...
...
@@ -41,12 +41,21 @@ function c92736188.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel
.
SelectTarget
(
tp
,
c92736188
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
end
function
c92736188
.
adop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
tc
:
IsAttribute
(
ATTRIBUTE_EARTH
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
batk
=
tc
:
GetBaseAttack
()
local
bdef
=
tc
:
GetBaseDefense
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SWAP_BASE_AD
)
e1
:
SetCode
(
EFFECT_SET_BASE_ATTACK_FINAL
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetValue
(
bdef
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SET_BASE_DEFENSE_FINAL
)
e2
:
SetValue
(
batk
)
tc
:
RegisterEffect
(
e2
)
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment