Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
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-2pick
Commits
f18d117a
Commit
f18d117a
authored
Jul 30, 2012
by
Fluorohydride
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #170 from VanillaSalt/patch16
fix script
parents
b7b3c72a
1ff6ef26
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
57 additions
and
43 deletions
+57
-43
ocgcore/card.cpp
ocgcore/card.cpp
+2
-1
script/c12735388.lua
script/c12735388.lua
+27
-11
script/c131182.lua
script/c131182.lua
+1
-1
script/c1412158.lua
script/c1412158.lua
+1
-1
script/c20057949.lua
script/c20057949.lua
+19
-27
script/c34029630.lua
script/c34029630.lua
+5
-1
script/c75923050.lua
script/c75923050.lua
+1
-1
script/c76972801.lua
script/c76972801.lua
+1
-0
No files found.
ocgcore/card.cpp
View file @
f18d117a
...
@@ -1662,7 +1662,8 @@ int32 card::is_setable_mzone(uint8 playerid, uint8 ignore_count, effect* peffect
...
@@ -1662,7 +1662,8 @@ int32 card::is_setable_mzone(uint8 playerid, uint8 ignore_count, effect* peffect
}
}
eset
.
clear
();
eset
.
clear
();
int32
res
=
filter_set_procedure
(
playerid
,
&
eset
,
ignore_count
);
int32
res
=
filter_set_procedure
(
playerid
,
&
eset
,
ignore_count
);
if
((
peffect
&&
res
<
0
)
||
(
!
peffect
&&
(
!
res
||
res
==
-
2
)
&&
!
eset
.
count
)
)
{
if
((
peffect
&&
res
<
0
)
||
(
!
peffect
&&
(
!
res
||
res
==
-
2
)
&&
!
eset
.
count
)
||
(
peffect
&&
(
eset
.
count
==
0
)
&&
!
pduel
->
game_field
->
is_player_can_mset
(
peffect
->
get_value
(),
playerid
,
this
)))
{
pduel
->
game_field
->
restore_lp_cost
();
pduel
->
game_field
->
restore_lp_cost
();
return
FALSE
;
return
FALSE
;
}
}
...
...
script/c12735388.lua
View file @
f18d117a
...
@@ -21,8 +21,8 @@ function c12735388.initial_effect(c)
...
@@ -21,8 +21,8 @@ function c12735388.initial_effect(c)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
e3
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCondition
(
c12735388
.
discon
)
e3
:
SetCondition
(
c12735388
.
discon
1
)
e3
:
SetOperation
(
c12735388
.
disop
)
e3
:
SetOperation
(
c12735388
.
disop
1
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c12735388
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c12735388
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
...
@@ -38,20 +38,36 @@ function c12735388.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -38,20 +38,36 @@ function c12735388.operation(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Equip
(
tp
,
e
:
GetHandler
(),
tc
)
Duel
.
Equip
(
tp
,
e
:
GetHandler
(),
tc
)
end
end
end
end
function
c12735388
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12735388
.
discon
1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ec
=
e
:
GetHandler
():
GetEquipTarget
()
local
ec
=
e
:
GetHandler
():
GetEquipTarget
()
return
ec
and
(
ec
==
Duel
.
GetAttacker
()
or
ec
==
Duel
.
GetAttackTarget
())
and
ec
:
GetBattleTarget
():
IsFaceup
()
return
ec
and
(
ec
==
Duel
.
GetAttacker
()
or
ec
==
Duel
.
GetAttackTarget
())
end
end
function
c12735388
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12735388
.
disop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetHandler
():
GetEquipTarget
():
GetBattleTarget
()
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
tc
=
c
:
GetEquipTarget
():
GetBattleTarget
()
c
:
CreateRelation
(
tc
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_BATTLE
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_OWNER_RELATE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_BATTLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_BATTLE
)
e1
:
SetCondition
(
c12735388
.
discon2
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_BATTLE
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_BATTLE
)
tc
:
RegisterEffect
(
e2
)
e2
:
SetOperation
(
c12735388
.
disop2
)
e2
:
SetLabelObject
(
tc
)
c
:
RegisterEffect
(
e2
)
end
function
c12735388
.
discon2
(
e
)
return
e
:
GetOwner
():
IsRelateToCard
(
e
:
GetHandler
())
end
function
c12735388
.
disop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
loc
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
)
if
loc
==
LOCATION_MZONE
and
re
:
GetHandler
()
==
e
:
GetLabelObject
()
then
Duel
.
NegateEffect
(
ev
)
end
end
end
script/c131182.lua
View file @
f18d117a
...
@@ -26,7 +26,7 @@ function c131182.initial_effect(c)
...
@@ -26,7 +26,7 @@ function c131182.initial_effect(c)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
--spsummon
--spsummon
local
e5
=
Effect
.
CreateEffect
(
c
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_
TRIGGER_F
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_
CONTINUOUS
)
e5
:
SetCode
(
EVENT_BATTLE_DESTROYED
)
e5
:
SetCode
(
EVENT_BATTLE_DESTROYED
)
e5
:
SetOperation
(
c131182
.
battleop
)
e5
:
SetOperation
(
c131182
.
battleop
)
c
:
RegisterEffect
(
e5
)
c
:
RegisterEffect
(
e5
)
...
...
script/c1412158.lua
View file @
f18d117a
...
@@ -7,7 +7,7 @@ function c1412158.initial_effect(c)
...
@@ -7,7 +7,7 @@ function c1412158.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1412158
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
1412158
,
0
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_
TRIGGER_F
+
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_
SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_PRE_DAMAGE_CALCULATE
)
e1
:
SetCode
(
EVENT_PRE_DAMAGE_CALCULATE
)
e1
:
SetCondition
(
c1412158
.
atkcon
)
e1
:
SetCondition
(
c1412158
.
atkcon
)
...
...
script/c20057949.lua
View file @
f18d117a
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
function
c20057949
.
initial_effect
(
c
)
function
c20057949
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
...
@@ -45,42 +46,33 @@ function c20057949.condition(e,tp,eg,ep,ev,re,r,rp)
...
@@ -45,42 +46,33 @@ function c20057949.condition(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c20057949
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c20057949
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCountLimit
(
1
)
e1
:
SetLabel
(
Duel
.
GetTurnCount
())
e1
:
SetLabel
(
Duel
.
GetTurnCount
())
e1
:
SetCondition
(
c20057949
.
spcon1
)
e1
:
SetCondition
(
c20057949
.
spcon
)
e1
:
SetOperation
(
c20057949
.
spop1
)
e1
:
SetTarget
(
c20057949
.
sptg
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
,
3
)
e1
:
SetOperation
(
c20057949
.
spop
)
if
Duel
.
GetTurnPlayer
()
==
tp
then
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_SELF_TURN
,
2
)
else
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_SELF_TURN
,
1
)
end
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
c20057949
.
filter
(
c
,
e
,
tp
)
function
c20057949
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
c
:
IsSetCard
(
0x31
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c20057949
.
spcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnCount
()
~=
e
:
GetLabel
()
and
Duel
.
GetTurnPlayer
()
==
tp
return
Duel
.
GetTurnCount
()
~=
e
:
GetLabel
()
and
Duel
.
GetTurnPlayer
()
==
tp
end
end
function
c20057949
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c20057949
.
filter
(
c
,
e
,
tp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
return
c
:
IsSetCard
(
0x31
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
IsExistingMatchingCard
(
c20057949
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
20057949
,
0
))
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetDescription
(
aux
.
Stringid
(
20057949
,
1
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
c20057949
.
sptg2
)
e1
:
SetOperation
(
c20057949
.
spop2
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
end
function
c20057949
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c20057949
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
2
,
tp
,
LOCATION_HAND
)
and
Duel
.
IsExistingMatchingCard
(
c20057949
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
end
function
c20057949
.
spop
2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c20057949
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
ft
<=
0
then
return
end
if
ft
<=
0
then
return
end
if
ft
>
2
then
ft
=
2
end
if
ft
>
2
then
ft
=
2
end
...
...
script/c34029630.lua
View file @
f18d117a
...
@@ -24,6 +24,7 @@ function c34029630.initial_effect(c)
...
@@ -24,6 +24,7 @@ function c34029630.initial_effect(c)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCondition
(
c34029630
.
condition
)
e3
:
SetTarget
(
c34029630
.
target2
)
e3
:
SetTarget
(
c34029630
.
target2
)
e3
:
SetOperation
(
c34029630
.
operation
)
e3
:
SetOperation
(
c34029630
.
operation
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
...
@@ -46,7 +47,7 @@ function c34029630.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...
@@ -46,7 +47,7 @@ function c34029630.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
c
:
AddCounter
(
0x3001
,
3
)
c
:
AddCounter
(
0x3001
,
3
)
if
c
:
IsCanRemoveCounter
(
tp
,
0x3001
,
1
,
REASON_EFFECT
)
if
Duel
.
GetTurnPlayer
()
==
tp
and
c
:
IsCanRemoveCounter
(
tp
,
0x3001
,
1
,
REASON_EFFECT
)
and
Duel
.
IsExistingTarget
(
c34029630
.
filter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
())
and
Duel
.
IsExistingTarget
(
c34029630
.
filter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
())
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
34029630
,
0
))
then
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
34029630
,
0
))
then
e
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
...
@@ -66,6 +67,9 @@ function c34029630.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -66,6 +67,9 @@ function c34029630.operation(e,tp,eg,ep,ev,re,r,rp)
tc
:
AddCounter
(
0x3001
,
1
)
tc
:
AddCounter
(
0x3001
,
1
)
end
end
end
end
function
c34029630
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
end
function
c34029630
.
filter
(
c
)
function
c34029630
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCanAddCounter
(
0x3001
,
1
)
return
c
:
IsFaceup
()
and
c
:
IsCanAddCounter
(
0x3001
,
1
)
end
end
...
...
script/c75923050.lua
View file @
f18d117a
...
@@ -7,7 +7,7 @@ function c75923050.initial_effect(c)
...
@@ -7,7 +7,7 @@ function c75923050.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
75923050
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
75923050
,
0
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_
TRIGGER_F
+
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_
SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_PRE_DAMAGE_CALCULATE
)
e1
:
SetCode
(
EVENT_PRE_DAMAGE_CALCULATE
)
e1
:
SetCondition
(
c75923050
.
atkcon
)
e1
:
SetCondition
(
c75923050
.
atkcon
)
...
...
script/c76972801.lua
View file @
f18d117a
...
@@ -24,5 +24,6 @@ function c76972801.activate(e,tp,eg,ep,ev,re,r,rp)
...
@@ -24,5 +24,6 @@ function c76972801.activate(e,tp,eg,ep,ev,re,r,rp)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
e1
:
Clone
()
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
Duel
.
RegisterEffect
(
e2
,
tp
)
Duel
.
RegisterEffect
(
e2
,
tp
)
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