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
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
wyykak
ygopro
Commits
a0e850d2
Commit
a0e850d2
authored
Nov 13, 2014
by
Argon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
custom counter
parent
61c86532
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
47 additions
and
58 deletions
+47
-58
ocgcore/card.h
ocgcore/card.h
+1
-1
ocgcore/field.cpp
ocgcore/field.cpp
+19
-1
ocgcore/field.h
ocgcore/field.h
+1
-0
ocgcore/interpreter.cpp
ocgcore/interpreter.cpp
+1
-0
ocgcore/libcard.cpp
ocgcore/libcard.cpp
+13
-0
ocgcore/operations.cpp
ocgcore/operations.cpp
+9
-54
ocgcore/scriptlib.h
ocgcore/scriptlib.h
+1
-0
script/c4149689.lua
script/c4149689.lua
+1
-1
script/constant.lua
script/constant.lua
+1
-1
No files found.
ocgcore/card.h
View file @
a0e850d2
...
@@ -371,7 +371,7 @@ public:
...
@@ -371,7 +371,7 @@ public:
#define STATUS_TO_DISABLE 0x0004 //
#define STATUS_TO_DISABLE 0x0004 //
#define STATUS_PROC_COMPLETE 0x0008 //
#define STATUS_PROC_COMPLETE 0x0008 //
#define STATUS_SET_TURN 0x0010 //
#define STATUS_SET_TURN 0x0010 //
#define STATUS_
FLIP_SUMMONED
0x0020 //
#define STATUS_
NO_LEVEL
0x0020 //
#define STATUS_REVIVE_LIMIT 0x0040 //
#define STATUS_REVIVE_LIMIT 0x0040 //
#define STATUS_ATTACKED 0x0080 //
#define STATUS_ATTACKED 0x0080 //
#define STATUS_FORM_CHANGED 0x0100 //
#define STATUS_FORM_CHANGED 0x0100 //
...
...
ocgcore/field.cpp
View file @
a0e850d2
...
@@ -1422,6 +1422,24 @@ effect* field::check_unique_onfield(card* pcard, uint8 controler) {
...
@@ -1422,6 +1422,24 @@ effect* field::check_unique_onfield(card* pcard, uint8 controler) {
return
0
;
return
0
;
}
}
void
field
::
CheckCounter
(
card
*
pcard
,
int32
counter_type
,
int32
playerid
)
{
auto
&
counter_map
=
(
counter_type
==
1
)
?
core
.
summon_counter
:
(
counter_type
==
2
)
?
core
.
normalsummon_counter
:
(
counter_type
==
3
)
?
core
.
spsummon_counter
:
(
counter_type
==
4
)
?
core
.
flipsummon_counter
:
core
.
attack_counter
;
for
(
auto
&
iter
:
counter_map
)
{
auto
&
info
=
iter
.
second
;
if
(
info
.
first
)
{
pduel
->
lua
->
add_param
(
pcard
,
PARAM_TYPE_CARD
);
if
(
!
pduel
->
lua
->
check_condition
(
info
.
first
,
1
))
{
if
(
playerid
==
0
)
info
.
second
+=
0x1
;
else
info
.
second
+=
0x10000
;
}
}
}
}
int32
field
::
check_lp_cost
(
uint8
playerid
,
uint32
lp
)
{
int32
field
::
check_lp_cost
(
uint8
playerid
,
uint32
lp
)
{
effect_set
eset
;
effect_set
eset
;
int32
val
=
lp
;
int32
val
=
lp
;
...
...
ocgcore/field.h
View file @
a0e850d2
...
@@ -353,6 +353,7 @@ public:
...
@@ -353,6 +353,7 @@ public:
void
add_unique_card
(
card
*
pcard
);
void
add_unique_card
(
card
*
pcard
);
void
remove_unique_card
(
card
*
pcard
);
void
remove_unique_card
(
card
*
pcard
);
effect
*
check_unique_onfield
(
card
*
pcard
,
uint8
controler
);
effect
*
check_unique_onfield
(
card
*
pcard
,
uint8
controler
);
void
CheckCounter
(
card
*
pcard
,
int32
counter_type
,
int32
playerid
);
int32
check_lp_cost
(
uint8
playerid
,
uint32
cost
);
int32
check_lp_cost
(
uint8
playerid
,
uint32
cost
);
void
save_lp_cost
();
void
save_lp_cost
();
...
...
ocgcore/interpreter.cpp
View file @
a0e850d2
...
@@ -151,6 +151,7 @@ static const struct luaL_Reg cardlib[] = {
...
@@ -151,6 +151,7 @@ static const struct luaL_Reg cardlib[] = {
{
"IsAbleToHandAsCost"
,
scriptlib
::
card_is_able_to_hand_as_cost
},
{
"IsAbleToHandAsCost"
,
scriptlib
::
card_is_able_to_hand_as_cost
},
{
"IsAbleToDeckAsCost"
,
scriptlib
::
card_is_able_to_deck_as_cost
},
{
"IsAbleToDeckAsCost"
,
scriptlib
::
card_is_able_to_deck_as_cost
},
{
"IsAbleToExtraAsCost"
,
scriptlib
::
card_is_able_to_extra_as_cost
},
{
"IsAbleToExtraAsCost"
,
scriptlib
::
card_is_able_to_extra_as_cost
},
{
"IsAbleToDeckOrExtraAsCost"
,
scriptlib
::
card_is_able_to_deck_or_extra_as_cost
},
{
"IsAbleToGraveAsCost"
,
scriptlib
::
card_is_able_to_grave_as_cost
},
{
"IsAbleToGraveAsCost"
,
scriptlib
::
card_is_able_to_grave_as_cost
},
{
"IsAbleToRemoveAsCost"
,
scriptlib
::
card_is_able_to_remove_as_cost
},
{
"IsAbleToRemoveAsCost"
,
scriptlib
::
card_is_able_to_remove_as_cost
},
{
"IsReleasable"
,
scriptlib
::
card_is_releasable
},
{
"IsReleasable"
,
scriptlib
::
card_is_releasable
},
...
...
ocgcore/libcard.cpp
View file @
a0e850d2
...
@@ -1319,6 +1319,18 @@ int32 scriptlib::card_is_able_to_extra_as_cost(lua_State *L) {
...
@@ -1319,6 +1319,18 @@ int32 scriptlib::card_is_able_to_extra_as_cost(lua_State *L) {
lua_pushboolean
(
L
,
0
);
lua_pushboolean
(
L
,
0
);
return
1
;
return
1
;
}
}
int32
scriptlib
::
card_is_able_to_deck_or_extra_as_cost
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
p
=
pcard
->
pduel
->
game_field
->
core
.
reason_player
;
int32
val
=
(
pcard
->
data
.
type
&
0x802040
)
?
pcard
->
is_capable_cost_to_extra
(
p
)
:
pcard
->
is_capable_cost_to_deck
(
p
);
if
(
val
)
lua_pushboolean
(
L
,
1
);
else
lua_pushboolean
(
L
,
0
);
return
1
;
}
int32
scriptlib
::
card_is_able_to_remove_as_cost
(
lua_State
*
L
)
{
int32
scriptlib
::
card_is_able_to_remove_as_cost
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
...
@@ -1888,6 +1900,7 @@ int32 scriptlib::card_add_trap_monster_attribute(lua_State *L) {
...
@@ -1888,6 +1900,7 @@ int32 scriptlib::card_add_trap_monster_attribute(lua_State *L) {
peffect
->
reset_flag
=
RESET_EVENT
+
0x47e0000
;
peffect
->
reset_flag
=
RESET_EVENT
+
0x47e0000
;
peffect
->
value
=
def
;
peffect
->
value
=
def
;
pcard
->
add_effect
(
peffect
);
pcard
->
add_effect
(
peffect
);
pcard
->
set_status
(
STATUS_NO_LEVEL
,
FALSE
);
return
0
;
return
0
;
}
}
int32
scriptlib
::
card_trap_monster_block
(
lua_State
*
L
)
{
int32
scriptlib
::
card_trap_monster_block
(
lua_State
*
L
)
{
...
...
ocgcore/operations.cpp
View file @
a0e850d2
...
@@ -1327,7 +1327,6 @@ int32 field::summon(uint16 step, uint8 sumplayer, card * target, effect * proc,
...
@@ -1327,7 +1327,6 @@ int32 field::summon(uint16 step, uint8 sumplayer, card * target, effect * proc,
pduel
->
write_buffer8
(
0
);
pduel
->
write_buffer8
(
0
);
pduel
->
write_buffer32
(
pextra
->
handler
->
data
.
code
);
pduel
->
write_buffer32
(
pextra
->
handler
->
data
.
code
);
}
}
target
->
set_status
(
STATUS_FLIP_SUMMONED
,
FALSE
);
target
->
enable_field_effect
(
FALSE
);
target
->
enable_field_effect
(
FALSE
);
if
(
is_player_affected_by_effect
(
sumplayer
,
EFFECT_DEVINE_LIGHT
))
if
(
is_player_affected_by_effect
(
sumplayer
,
EFFECT_DEVINE_LIGHT
))
move_to_field
(
target
,
sumplayer
,
sumplayer
,
LOCATION_MZONE
,
POS_FACEUP
);
move_to_field
(
target
,
sumplayer
,
sumplayer
,
LOCATION_MZONE
,
POS_FACEUP
);
...
@@ -1396,6 +1395,8 @@ int32 field::summon(uint16 step, uint8 sumplayer, card * target, effect * proc,
...
@@ -1396,6 +1395,8 @@ int32 field::summon(uint16 step, uint8 sumplayer, card * target, effect * proc,
pduel
->
write_buffer8
(
target
->
current
.
position
);
pduel
->
write_buffer8
(
target
->
current
.
position
);
core
.
summon_state_count
[
sumplayer
]
++
;
core
.
summon_state_count
[
sumplayer
]
++
;
core
.
normalsummon_state_count
[
sumplayer
]
++
;
core
.
normalsummon_state_count
[
sumplayer
]
++
;
CheckCounter
(
target
,
1
,
sumplayer
);
CheckCounter
(
target
,
2
,
sumplayer
);
if
(
target
->
material_cards
.
size
())
{
if
(
target
->
material_cards
.
size
())
{
for
(
auto
mit
=
target
->
material_cards
.
begin
();
mit
!=
target
->
material_cards
.
end
();
++
mit
)
for
(
auto
mit
=
target
->
material_cards
.
begin
();
mit
!=
target
->
material_cards
.
end
();
++
mit
)
raise_single_event
(
*
mit
,
0
,
EVENT_BE_PRE_MATERIAL
,
proc
,
REASON_SUMMON
,
sumplayer
,
sumplayer
,
0
);
raise_single_event
(
*
mit
,
0
,
EVENT_BE_PRE_MATERIAL
,
proc
,
REASON_SUMMON
,
sumplayer
,
sumplayer
,
0
);
...
@@ -1526,6 +1527,7 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target) {
...
@@ -1526,6 +1527,7 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target) {
target
->
fieldid
=
infos
.
field_id
++
;
target
->
fieldid
=
infos
.
field_id
++
;
core
.
phase_action
=
TRUE
;
core
.
phase_action
=
TRUE
;
core
.
flipsummon_state_count
[
sumplayer
]
++
;
core
.
flipsummon_state_count
[
sumplayer
]
++
;
CheckCounter
(
target
,
4
,
sumplayer
);
pduel
->
write_buffer8
(
MSG_FLIPSUMMONING
);
pduel
->
write_buffer8
(
MSG_FLIPSUMMONING
);
pduel
->
write_buffer32
(
target
->
data
.
code
);
pduel
->
write_buffer32
(
target
->
data
.
code
);
pduel
->
write_buffer8
(
target
->
current
.
controler
);
pduel
->
write_buffer8
(
target
->
current
.
controler
);
...
@@ -1554,7 +1556,6 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target) {
...
@@ -1554,7 +1556,6 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target) {
case
3
:
{
case
3
:
{
target
->
set_status
(
STATUS_SUMMONING
,
FALSE
);
target
->
set_status
(
STATUS_SUMMONING
,
FALSE
);
target
->
enable_field_effect
(
TRUE
);
target
->
enable_field_effect
(
TRUE
);
target
->
set_status
(
STATUS_FLIP_SUMMONED
,
TRUE
);
if
(
target
->
is_status
(
STATUS_DISABLED
))
if
(
target
->
is_status
(
STATUS_DISABLED
))
target
->
reset
(
RESET_DISABLE
,
RESET_EVENT
);
target
->
reset
(
RESET_DISABLE
,
RESET_EVENT
);
target
->
set_status
(
STATUS_SUMMON_TURN
,
TRUE
);
target
->
set_status
(
STATUS_SUMMON_TURN
,
TRUE
);
...
@@ -1744,6 +1745,7 @@ int32 field::mset(uint16 step, uint8 setplayer, card * target, effect * proc, ui
...
@@ -1744,6 +1745,7 @@ int32 field::mset(uint16 step, uint8 setplayer, card * target, effect * proc, ui
set_control
(
target
,
setplayer
,
0
,
0
);
set_control
(
target
,
setplayer
,
0
,
0
);
core
.
phase_action
=
TRUE
;
core
.
phase_action
=
TRUE
;
core
.
normalsummon_state_count
[
setplayer
]
++
;
core
.
normalsummon_state_count
[
setplayer
]
++
;
CheckCounter
(
target
,
2
,
setplayer
);
target
->
set_status
(
STATUS_SUMMON_TURN
,
TRUE
);
target
->
set_status
(
STATUS_SUMMON_TURN
,
TRUE
);
pduel
->
write_buffer8
(
MSG_SET
);
pduel
->
write_buffer8
(
MSG_SET
);
pduel
->
write_buffer32
(
target
->
data
.
code
);
pduel
->
write_buffer32
(
target
->
data
.
code
);
...
@@ -2007,22 +2009,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target) {
...
@@ -2007,22 +2009,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target) {
target
->
current
.
reason_player
=
sumplayer
;
target
->
current
.
reason_player
=
sumplayer
;
target
->
summon_player
=
sumplayer
;
target
->
summon_player
=
sumplayer
;
core
.
spsummon_state_count
[
sumplayer
]
++
;
core
.
spsummon_state_count
[
sumplayer
]
++
;
for
(
auto
&
iter
:
core
.
spsummon_counter
)
{
CheckCounter
(
target
,
3
,
sumplayer
);
auto
&
info
=
iter
.
second
;
if
(
info
.
first
)
{
pduel
->
lua
->
add_param
(
peffect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
sumplayer
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
target
->
summon_info
&
0xff00ffff
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
positions
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
sumplayer
,
PARAM_TYPE_INT
);
if
(
!
pduel
->
lua
->
check_condition
(
info
.
first
,
5
))
{
if
(
sumplayer
==
0
)
info
.
second
+=
0x1
;
else
info
.
second
+=
0x10000
;
}
}
}
break_effect
();
break_effect
();
return
FALSE
;
return
FALSE
;
}
}
...
@@ -2076,7 +2063,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target) {
...
@@ -2076,7 +2063,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target) {
case
10
:
{
case
10
:
{
core
.
summoning_card
=
0
;
core
.
summoning_card
=
0
;
target
->
set_status
(
STATUS_SUMMONING
,
TRUE
);
target
->
set_status
(
STATUS_SUMMONING
,
TRUE
);
target
->
set_status
(
STATUS_SUMMON_DISABLED
|
STATUS_FLIP_SUMMONED
,
FALSE
);
target
->
set_status
(
STATUS_SUMMON_DISABLED
,
FALSE
);
raise_event
(
target
,
EVENT_SPSUMMON
,
core
.
units
.
begin
()
->
peffect
,
0
,
sumplayer
,
sumplayer
,
0
);
raise_event
(
target
,
EVENT_SPSUMMON
,
core
.
units
.
begin
()
->
peffect
,
0
,
sumplayer
,
sumplayer
,
0
);
process_instant_event
();
process_instant_event
();
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
TRUE
,
TRUE
);
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
TRUE
,
TRUE
);
...
@@ -2185,22 +2172,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target) {
...
@@ -2185,22 +2172,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target) {
pcard
->
summon_info
=
(
peffect
->
get_value
(
pcard
)
&
0xff00ffff
)
|
SUMMON_TYPE_SPECIAL
|
((
uint32
)
target
->
current
.
location
<<
16
);
pcard
->
summon_info
=
(
peffect
->
get_value
(
pcard
)
&
0xff00ffff
)
|
SUMMON_TYPE_SPECIAL
|
((
uint32
)
target
->
current
.
location
<<
16
);
move_to_field
(
pcard
,
sumplayer
,
sumplayer
,
LOCATION_MZONE
,
POS_FACEUP
);
move_to_field
(
pcard
,
sumplayer
,
sumplayer
,
LOCATION_MZONE
,
POS_FACEUP
);
core
.
spsummon_state_count
[
sumplayer
]
++
;
core
.
spsummon_state_count
[
sumplayer
]
++
;
for
(
auto
&
iter
:
core
.
spsummon_counter
)
{
CheckCounter
(
target
,
3
,
sumplayer
);
auto
&
info
=
iter
.
second
;
if
(
info
.
first
)
{
pduel
->
lua
->
add_param
(
peffect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
sumplayer
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
target
->
summon_info
&
0xff00ffff
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
POS_FACEUP
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
sumplayer
,
PARAM_TYPE_INT
);
if
(
!
pduel
->
lua
->
check_condition
(
info
.
first
,
5
))
{
if
(
sumplayer
==
0
)
info
.
second
+=
0x1
;
else
info
.
second
+=
0x10000
;
}
}
}
return
FALSE
;
return
FALSE
;
}
}
case
24
:
{
case
24
:
{
...
@@ -2342,24 +2314,8 @@ int32 field::special_summon_step(uint16 step, group * targets, card * target) {
...
@@ -2342,24 +2314,8 @@ int32 field::special_summon_step(uint16 step, group * targets, card * target) {
if
(
!
targets
)
if
(
!
targets
)
core
.
special_summoning
.
insert
(
target
);
core
.
special_summoning
.
insert
(
target
);
target
->
enable_field_effect
(
FALSE
);
target
->
enable_field_effect
(
FALSE
);
target
->
set_status
(
STATUS_FLIP_SUMMONED
,
FALSE
);
core
.
spsummon_state_count
[
target
->
summon_player
]
++
;
core
.
spsummon_state_count
[
target
->
summon_player
]
++
;
for
(
auto
&
iter
:
core
.
spsummon_counter
)
{
CheckCounter
(
target
,
3
,
target
->
summon_player
);
auto
&
info
=
iter
.
second
;
if
(
info
.
first
)
{
pduel
->
lua
->
add_param
(
core
.
reason_effect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
target
->
summon_player
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
target
->
summon_info
&
0xff00ffff
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
positions
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
playerid
,
PARAM_TYPE_INT
);
if
(
!
pduel
->
lua
->
check_condition
(
info
.
first
,
5
))
{
if
(
playerid
==
0
)
info
.
second
+=
0x1
;
else
info
.
second
+=
0x10000
;
}
}
}
core
.
hint_timing
[
target
->
summon_player
]
|=
TIMING_SPSUMMON
;
core
.
hint_timing
[
target
->
summon_player
]
|=
TIMING_SPSUMMON
;
move_to_field
(
target
,
target
->
summon_player
,
playerid
,
LOCATION_MZONE
,
positions
);
move_to_field
(
target
,
target
->
summon_player
,
playerid
,
LOCATION_MZONE
,
positions
);
return
FALSE
;
return
FALSE
;
...
@@ -3515,9 +3471,8 @@ int32 field::change_position(uint16 step, group * targets, effect * reason_effec
...
@@ -3515,9 +3471,8 @@ int32 field::change_position(uint16 step, group * targets, effect * reason_effec
trapmonster
=
true
;
trapmonster
=
true
;
pcard
->
reset
(
RESET_TURN_SET
,
RESET_EVENT
);
pcard
->
reset
(
RESET_TURN_SET
,
RESET_EVENT
);
pcard
->
set_status
(
STATUS_SET_TURN
,
TRUE
);
pcard
->
set_status
(
STATUS_SET_TURN
,
TRUE
);
pcard
->
set_status
(
STATUS_FLIP_SUMMONED
,
FALSE
);
pcard
->
enable_field_effect
(
FALSE
);
pcard
->
enable_field_effect
(
FALSE
);
pcard
->
summon_info
&=
0x
f
f00ffff
;
pcard
->
summon_info
&=
0x
d
f00ffff
;
}
}
if
((
npos
&
POS_FACEDOWN
)
&&
pcard
->
equiping_cards
.
size
())
{
if
((
npos
&
POS_FACEDOWN
)
&&
pcard
->
equiping_cards
.
size
())
{
for
(
auto
csit
=
pcard
->
equiping_cards
.
begin
();
csit
!=
pcard
->
equiping_cards
.
end
();)
{
for
(
auto
csit
=
pcard
->
equiping_cards
.
begin
();
csit
!=
pcard
->
equiping_cards
.
end
();)
{
...
...
ocgcore/scriptlib.h
View file @
a0e850d2
...
@@ -154,6 +154,7 @@ public:
...
@@ -154,6 +154,7 @@ public:
static
int32
card_is_able_to_grave_as_cost
(
lua_State
*
L
);
static
int32
card_is_able_to_grave_as_cost
(
lua_State
*
L
);
static
int32
card_is_able_to_deck_as_cost
(
lua_State
*
L
);
static
int32
card_is_able_to_deck_as_cost
(
lua_State
*
L
);
static
int32
card_is_able_to_extra_as_cost
(
lua_State
*
L
);
static
int32
card_is_able_to_extra_as_cost
(
lua_State
*
L
);
static
int32
card_is_able_to_deck_or_extra_as_cost
(
lua_State
*
L
);
static
int32
card_is_able_to_remove_as_cost
(
lua_State
*
L
);
static
int32
card_is_able_to_remove_as_cost
(
lua_State
*
L
);
static
int32
card_is_releasable
(
lua_State
*
L
);
static
int32
card_is_releasable
(
lua_State
*
L
);
static
int32
card_is_releasable_by_effect
(
lua_State
*
L
);
static
int32
card_is_releasable_by_effect
(
lua_State
*
L
);
...
...
script/c4149689.lua
View file @
a0e850d2
...
@@ -26,7 +26,7 @@ function c4149689.initial_effect(c)
...
@@ -26,7 +26,7 @@ function c4149689.initial_effect(c)
end
end
function
c4149689
.
aclimit
(
e
,
re
,
tp
)
function
c4149689
.
aclimit
(
e
,
re
,
tp
)
local
rc
=
re
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
return
re
:
IsActiveType
(
TYPE_MONSTER
)
and
rc
:
IsStatus
(
STATUS_FLIP_SUMMONED
)
and
rc
:
IsLevelBelow
(
2
)
return
re
:
IsActiveType
(
TYPE_MONSTER
)
and
bit
.
band
(
rc
:
GetSummonType
(),
SUMMON_TYPE_FLIP
)
==
SUMMON_TYPE_FLIP
and
rc
:
IsLevelBelow
(
2
)
end
end
function
c4149689
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c4149689
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
eg
:
GetFirst
():
IsLevelBelow
(
2
)
end
if
chk
==
0
then
return
eg
:
GetFirst
():
IsLevelBelow
(
2
)
end
...
...
script/constant.lua
View file @
a0e850d2
...
@@ -125,7 +125,7 @@ STATUS_TO_ENABLE =0x0002 --将变成有效
...
@@ -125,7 +125,7 @@ STATUS_TO_ENABLE =0x0002 --将变成有效
STATUS_TO_DISABLE
=
0x0004
--将变成无效
STATUS_TO_DISABLE
=
0x0004
--将变成无效
STATUS_PROC_COMPLETE
=
0x0008
--完成正规召唤(解除苏生限制)
STATUS_PROC_COMPLETE
=
0x0008
--完成正规召唤(解除苏生限制)
STATUS_SET_TURN
=
0x0010
--覆盖
STATUS_SET_TURN
=
0x0010
--覆盖
STATUS_
FLIP_SUMMONED
=
0x0020
--翻转
STATUS_
NO_LEVEL
=
0x0020
--无等级
STATUS_REVIVE_LIMIT
=
0x0040
--未解除苏生限制
STATUS_REVIVE_LIMIT
=
0x0040
--未解除苏生限制
STATUS_ATTACKED
=
0x0080
--攻击过
STATUS_ATTACKED
=
0x0080
--攻击过
STATUS_FORM_CHANGED
=
0x0100
--改变过表示形式
STATUS_FORM_CHANGED
=
0x0100
--改变过表示形式
...
...
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