Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
Commits
de1200fa
Commit
de1200fa
authored
Dec 19, 2013
by
VanillaSalt
Committed by
sidschingis
Dec 20, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
dee76ddc
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
74 additions
and
29 deletions
+74
-29
ocgcore/card.cpp
ocgcore/card.cpp
+2
-0
ocgcore/processor.cpp
ocgcore/processor.cpp
+2
-0
script/c30451366.lua
script/c30451366.lua
+4
-2
script/c30604579.lua
script/c30604579.lua
+3
-1
script/c34029630.lua
script/c34029630.lua
+1
-2
script/c36378044.lua
script/c36378044.lua
+1
-1
script/c40343749.lua
script/c40343749.lua
+3
-0
script/c50259460.lua
script/c50259460.lua
+4
-2
script/c51452091.lua
script/c51452091.lua
+1
-1
script/c53244294.lua
script/c53244294.lua
+1
-1
script/c53493204.lua
script/c53493204.lua
+4
-2
script/c63689843.lua
script/c63689843.lua
+1
-1
script/c67098114.lua
script/c67098114.lua
+3
-1
script/c79109599.lua
script/c79109599.lua
+5
-3
script/c93483212.lua
script/c93483212.lua
+3
-1
script/c94773007.lua
script/c94773007.lua
+10
-4
script/c96012004.lua
script/c96012004.lua
+21
-3
script/c96235275.lua
script/c96235275.lua
+1
-2
script/c99426834.lua
script/c99426834.lua
+4
-2
No files found.
ocgcore/card.cpp
View file @
de1200fa
...
@@ -804,6 +804,8 @@ void card::enable_field_effect(int32 enabled) {
...
@@ -804,6 +804,8 @@ void card::enable_field_effect(int32 enabled) {
for (it = equip_effect.begin(); it != equip_effect.end(); ++it)
for (it = equip_effect.begin(); it != equip_effect.end(); ++it)
it->second->id = pduel->game_field->infos.field_id++;
it->second->id = pduel->game_field->infos.field_id++;
}
}
if (get_status(STATUS_DISABLED))
reset(RESET_DISABLE, RESET_EVENT);
} else
} else
set_status(STATUS_EFFECT_ENABLED, FALSE);
set_status(STATUS_EFFECT_ENABLED, FALSE);
filter_immune_effect();
filter_immune_effect();
...
...
ocgcore/processor.cpp
View file @
de1200fa
...
@@ -3658,6 +3658,8 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -3658,6 +3658,8 @@ int32 field::process_battle_command(uint16 step) {
return FALSE;
return FALSE;
}
}
case 40: {
case 40: {
core.attacker = 0;
core.attack_target = 0;
returns.ivalue[0] = core.units.begin()->arg1;
returns.ivalue[0] = core.units.begin()->arg1;
returns.ivalue[1] = core.units.begin()->arg2;
returns.ivalue[1] = core.units.begin()->arg2;
return TRUE;
return TRUE;
...
...
script/c30451366.lua
View file @
de1200fa
...
@@ -3,8 +3,10 @@ function c30451366.initial_effect(c)
...
@@ -3,8 +3,10 @@ function c30451366.initial_effect(c)
--fusion substitute
--fusion substitute
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
0x1e
)
e1
:
SetCode
(
EFFECT_FUSION_SUBSTITUTE
)
e1
:
SetCode
(
EFFECT_FUSION_SUBSTITUTE
)
e1
:
SetCondition
(
c30451366
.
subcon
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c30451366
.
subcon
(
e
)
return
e
:
GetHandler
():
IsLocation
(
LOCATION_HAND
+
LOCATION_ONFIELD
+
LOCATION_GRAVE
)
end
script/c30604579.lua
View file @
de1200fa
...
@@ -69,8 +69,10 @@ function c30604579.disop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -69,8 +69,10 @@ function c30604579.disop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c30604579
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c30604579
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
pos
=
c
:
GetPreviousPosition
()
if
c
:
IsReason
(
REASON_BATTLE
)
then
pos
=
c
:
GetBattlePosition
()
end
if
rp
~=
tp
and
c
:
GetPreviousControler
()
==
tp
and
c
:
IsReason
(
REASON_DESTROY
)
if
rp
~=
tp
and
c
:
GetPreviousControler
()
==
tp
and
c
:
IsReason
(
REASON_DESTROY
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
then
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
bit
.
band
(
pos
,
POS_FACEUP
)
~=
0
then
c
:
RegisterFlagEffect
(
30604579
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
c
:
RegisterFlagEffect
(
30604579
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
end
end
...
...
script/c34029630.lua
View file @
de1200fa
...
@@ -39,8 +39,7 @@ function c34029630.initial_effect(c)
...
@@ -39,8 +39,7 @@ function c34029630.initial_effect(c)
end
end
function
c34029630
.
ctpermit
(
e
)
function
c34029630
.
ctpermit
(
e
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsLocation
(
LOCATION_SZONE
)
then
return
false
end
return
c
:
IsLocation
(
LOCATION_SZONE
)
and
not
c
:
IsStatus
(
STATUS_DISABLED
)
return
not
c
:
IsStatus
(
STATUS_EFFECT_ENABLED
)
or
not
c
:
IsStatus
(
STATUS_DISABLED
)
end
end
function
c34029630
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c34029630
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
c34029630
.
filter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsOnField
()
and
c34029630
.
filter
(
chkc
)
end
...
...
script/c36378044.lua
View file @
de1200fa
...
@@ -41,7 +41,7 @@ function c36378044.atktg1(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -41,7 +41,7 @@ function c36378044.atktg1(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function
c36378044
.
atktg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c36378044
.
atktg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetFlagEffect
(
36378044
)
==
0
end
if
chk
==
0
then
return
e
:
GetHandler
():
GetFlagEffect
(
36378044
)
==
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
3
)
e
:
GetHandler
():
RegisterFlagEffect
(
36378044
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
e
:
GetHandler
():
RegisterFlagEffect
(
36378044
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
function
c36378044
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c36378044
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c40343749.lua
View file @
de1200fa
...
@@ -14,6 +14,9 @@ function c40343749.initial_effect(c)
...
@@ -14,6 +14,9 @@ function c40343749.initial_effect(c)
end
end
function
c40343749
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c40343749
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsReason
(
REASON_BATTLE
)
then
return
c
:
GetReasonPlayer
()
~=
tp
and
bit
.
band
(
c
:
GetBattlePosition
(),
POS_FACEUP
)
~=
0
end
return
rp
~=
tp
and
c
:
IsReason
(
REASON_DESTROY
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
return
rp
~=
tp
and
c
:
IsReason
(
REASON_DESTROY
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
GetPreviousControler
()
==
tp
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
GetPreviousControler
()
==
tp
end
end
...
...
script/c50259460.lua
View file @
de1200fa
...
@@ -3,8 +3,10 @@ function c50259460.initial_effect(c)
...
@@ -3,8 +3,10 @@ function c50259460.initial_effect(c)
--fusion substitute
--fusion substitute
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
0x1e
)
e1
:
SetCode
(
EFFECT_FUSION_SUBSTITUTE
)
e1
:
SetCode
(
EFFECT_FUSION_SUBSTITUTE
)
e1
:
SetCondition
(
c50259460
.
subcon
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c50259460
.
subcon
(
e
)
return
e
:
GetHandler
():
IsLocation
(
LOCATION_HAND
+
LOCATION_ONFIELD
+
LOCATION_GRAVE
)
end
script/c51452091.lua
View file @
de1200fa
...
@@ -31,7 +31,7 @@ function c51452091.initial_effect(c)
...
@@ -31,7 +31,7 @@ function c51452091.initial_effect(c)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
end
end
function
c51452091
.
distarget
(
e
,
c
)
function
c51452091
.
distarget
(
e
,
c
)
return
c
~=
e
:
GetHandler
()
and
c
:
IsType
(
TYPE_TRAP
)
return
c
~=
e
:
GetHandler
()
and
c
:
IsType
(
TYPE_TRAP
)
and
c
:
IsStatus
(
STATUS_ACTIVATED
)
end
end
function
c51452091
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c51452091
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tl
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
)
local
tl
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
)
...
...
script/c53244294.lua
View file @
de1200fa
...
@@ -7,7 +7,7 @@ function c53244294.initial_effect(c)
...
@@ -7,7 +7,7 @@ function c53244294.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
53244294
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
53244294
,
0
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetTarget
(
c53244294
.
atktg
)
e1
:
SetTarget
(
c53244294
.
atktg
)
e1
:
SetOperation
(
c53244294
.
atkop
)
e1
:
SetOperation
(
c53244294
.
atkop
)
...
...
script/c53493204.lua
View file @
de1200fa
...
@@ -3,8 +3,10 @@ function c53493204.initial_effect(c)
...
@@ -3,8 +3,10 @@ function c53493204.initial_effect(c)
--fusion substitute
--fusion substitute
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
0x1e
)
e1
:
SetCode
(
EFFECT_FUSION_SUBSTITUTE
)
e1
:
SetCode
(
EFFECT_FUSION_SUBSTITUTE
)
e1
:
SetCondition
(
c53493204
.
subcon
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c53493204
.
subcon
(
e
)
return
e
:
GetHandler
():
IsLocation
(
LOCATION_HAND
+
LOCATION_ONFIELD
+
LOCATION_GRAVE
)
end
script/c63689843.lua
View file @
de1200fa
...
@@ -19,7 +19,7 @@ end
...
@@ -19,7 +19,7 @@ end
function
c63689843
.
recop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c63689843
.
recop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Damage
(
p
,
d
,
REASON_EFFECT
)
Duel
.
Damage
(
p
,
d
,
REASON_EFFECT
)
local
gc
=
Duel
.
GetMatchingGroupCount
(
Card
.
IsCode
,
p
,
LOCATION_GRAVE
,
0
,
nil
,
63689843
)
local
gc
=
Duel
.
GetMatchingGroupCount
(
Card
.
IsCode
,
t
p
,
LOCATION_GRAVE
,
0
,
nil
,
63689843
)
if
gc
>
0
then
if
gc
>
0
then
Duel
.
Damage
(
p
,
300
*
gc
,
REASON_EFFECT
)
Duel
.
Damage
(
p
,
300
*
gc
,
REASON_EFFECT
)
end
end
...
...
script/c67098114.lua
View file @
de1200fa
...
@@ -68,8 +68,10 @@ function c67098114.disop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -68,8 +68,10 @@ function c67098114.disop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c67098114
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c67098114
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
pos
=
c
:
GetPreviousPosition
()
if
c
:
IsReason
(
REASON_BATTLE
)
then
pos
=
c
:
GetBattlePosition
()
end
if
rp
~=
tp
and
c
:
GetPreviousControler
()
==
tp
and
c
:
IsReason
(
REASON_DESTROY
)
if
rp
~=
tp
and
c
:
GetPreviousControler
()
==
tp
and
c
:
IsReason
(
REASON_DESTROY
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
then
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
bit
.
band
(
pos
,
POS_FACEUP
)
~=
0
then
c
:
RegisterFlagEffect
(
67098114
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
c
:
RegisterFlagEffect
(
67098114
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
end
end
...
...
script/c79109599.lua
View file @
de1200fa
...
@@ -13,11 +13,13 @@ function c79109599.initial_effect(c)
...
@@ -13,11 +13,13 @@ function c79109599.initial_effect(c)
--fusion substitute
--fusion substitute
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
0x1e
)
e2
:
SetCode
(
EFFECT_FUSION_SUBSTITUTE
)
e2
:
SetCode
(
EFFECT_FUSION_SUBSTITUTE
)
e2
:
SetCondition
(
c79109599
.
subcon
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c79109599
.
subcon
(
e
)
return
e
:
GetHandler
():
IsLocation
(
LOCATION_HAND
+
LOCATION_ONFIELD
+
LOCATION_GRAVE
)
end
function
c79109599
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c79109599
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsDiscardable
()
end
if
chk
==
0
then
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsDiscardable
()
end
...
@@ -26,7 +28,7 @@ end
...
@@ -26,7 +28,7 @@ end
function
c79109599
.
filter
(
c
)
function
c79109599
.
filter
(
c
)
return
c
:
GetCode
()
==
24094653
and
c
:
IsAbleToHand
()
return
c
:
GetCode
()
==
24094653
and
c
:
IsAbleToHand
()
end
end
function
c79109599
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c79109599
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c79109599
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c79109599
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
...
...
script/c93483212.lua
View file @
de1200fa
...
@@ -62,8 +62,10 @@ function c93483212.imfilter(e,re)
...
@@ -62,8 +62,10 @@ function c93483212.imfilter(e,re)
end
end
function
c93483212
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c93483212
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
pos
=
c
:
GetPreviousPosition
()
if
c
:
IsReason
(
REASON_BATTLE
)
then
pos
=
c
:
GetBattlePosition
()
end
if
rp
~=
tp
and
c
:
GetPreviousControler
()
==
tp
and
c
:
IsReason
(
REASON_DESTROY
)
if
rp
~=
tp
and
c
:
GetPreviousControler
()
==
tp
and
c
:
IsReason
(
REASON_DESTROY
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
then
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
bit
.
band
(
pos
,
POS_FACEUP
)
~=
0
then
c
:
RegisterFlagEffect
(
93483212
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
c
:
RegisterFlagEffect
(
93483212
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
end
end
...
...
script/c94773007.lua
View file @
de1200fa
--地雷蜘蛛
--地雷蜘蛛
function
c94773007
.
initial_effect
(
c
)
function
c94773007
.
initial_effect
(
c
)
--
attack cost
--
coin
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetDescription
(
aux
.
Stringid
(
94773007
,
0
))
e1
:
SetCode
(
EFFECT_ATTACK_COST
)
e1
:
SetCategory
(
CATEGORY_COIN
)
e1
:
SetCost
(
aux
.
TRUE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e1
:
SetTarget
(
c94773007
.
attg
)
e1
:
SetOperation
(
c94773007
.
atop
)
e1
:
SetOperation
(
c94773007
.
atop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c94773007
.
attg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
end
function
c94773007
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c94773007
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
opt
=
Duel
.
SelectOption
(
tp
,
60
,
61
)
local
opt
=
Duel
.
SelectOption
(
tp
,
60
,
61
)
local
coin
=
Duel
.
TossCoin
(
tp
,
1
)
local
coin
=
Duel
.
TossCoin
(
tp
,
1
)
...
...
script/c96012004.lua
View file @
de1200fa
...
@@ -4,6 +4,8 @@ function c96012004.initial_effect(c)
...
@@ -4,6 +4,8 @@ function c96012004.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c96012004
.
cointg
)
e1
:
SetOperation
(
c96012004
.
coinop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--coin
--coin
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
...
@@ -15,15 +17,31 @@ function c96012004.initial_effect(c)
...
@@ -15,15 +17,31 @@ function c96012004.initial_effect(c)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCondition
(
c96012004
.
coincon
)
e2
:
SetCondition
(
c96012004
.
coincon
)
e2
:
SetOperation
(
c96012004
.
coinop
)
e2
:
SetOperation
(
c96012004
.
coinop
)
e2
:
SetLabel
(
1
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c96012004
.
coincon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c96012004
.
coincon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ex
,
eg
,
et
,
cp
,
ct
=
Duel
.
GetOperationInfo
(
ev
,
CATEGORY_COIN
)
local
ex
,
eg
,
et
,
cp
,
ct
=
Duel
.
GetOperationInfo
(
ev
,
CATEGORY_COIN
)
return
ex
and
ct
==
1
and
re
:
IsActiveType
(
TYPE_MONSTER
)
if
ex
and
ct
==
1
and
re
:
IsActiveType
(
TYPE_MONSTER
)
then
e
:
SetLabelObject
(
re
)
return
true
else
return
false
end
end
function
c96012004
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
e
:
SetLabel
(
0
)
local
cc
=
Duel
.
GetCurrentChain
()
if
cc
==
1
then
return
end
local
te
=
Duel
.
GetChainInfo
(
cc
-
1
,
CHAININFO_TRIGGERING_EFFECT
)
local
ex
,
eg
,
et
,
cp
,
ct
=
Duel
.
GetOperationInfo
(
cc
-
1
,
CATEGORY_COIN
)
if
ex
and
ct
==
1
and
te
:
IsActiveType
(
TYPE_MONSTER
)
then
e
:
SetLabel
(
1
)
e
:
SetLabelObject
(
te
)
end
end
end
function
c96012004
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c96012004
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
e
:
GetLabel
()
==
0
or
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_COIN
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_COIN
)
local
res
=
1
-
Duel
.
SelectOption
(
tp
,
60
,
61
)
local
res
=
1
-
Duel
.
SelectOption
(
tp
,
60
,
61
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
...
@@ -34,7 +52,7 @@ function c96012004.coinop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -34,7 +52,7 @@ function c96012004.coinop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetOperation
(
c96012004
.
drop
)
e1
:
SetOperation
(
c96012004
.
drop
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCountLimit
(
1
)
e1
:
SetReset
(
RESET_CHAIN
)
e1
:
SetReset
(
RESET_CHAIN
)
e1
:
SetLabelObject
(
re
)
e1
:
SetLabelObject
(
e
:
GetLabelObject
()
)
e1
:
SetLabel
(
res
)
e1
:
SetLabel
(
res
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
...
...
script/c96235275.lua
View file @
de1200fa
...
@@ -29,8 +29,7 @@ function c96235275.discon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -29,8 +29,7 @@ function c96235275.discon(e,tp,eg,ep,ev,re,r,rp)
return
tp
==
Duel
.
GetTurnPlayer
()
return
tp
==
Duel
.
GetTurnPlayer
()
end
end
function
c96235275
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c96235275
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetFlagEffect
(
96235275
)
==
0
end
if
chk
==
0
then
return
true
end
e
:
GetHandler
():
RegisterFlagEffect
(
96235275
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
RESET_END
,
EFFECT_FLAG_OATH
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DECKDES
,
nil
,
0
,
tp
,
2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DECKDES
,
nil
,
0
,
tp
,
2
)
end
end
function
c96235275
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c96235275
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c99426834.lua
View file @
de1200fa
...
@@ -3,8 +3,10 @@ function c99426834.initial_effect(c)
...
@@ -3,8 +3,10 @@ function c99426834.initial_effect(c)
--fusion substitute
--fusion substitute
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
0x1e
)
e1
:
SetCode
(
EFFECT_FUSION_SUBSTITUTE
)
e1
:
SetCode
(
EFFECT_FUSION_SUBSTITUTE
)
e1
:
SetCondition
(
c99426834
.
subcon
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c99426834
.
subcon
(
e
)
return
e
:
GetHandler
():
IsLocation
(
LOCATION_HAND
+
LOCATION_ONFIELD
+
LOCATION_GRAVE
)
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