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
1
Merge Requests
1
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
nanahira
ygopro
Commits
834e2938
Commit
834e2938
authored
Aug 31, 2015
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EFFECT_UNSUMMONABLE_CARD, EFFECT_REVIVE_LIMIT
revised
parent
2cf47492
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
56 additions
and
23 deletions
+56
-23
ocgcore/card.cpp
ocgcore/card.cpp
+4
-4
ocgcore/effect.h
ocgcore/effect.h
+2
-0
ocgcore/interpreter.cpp
ocgcore/interpreter.cpp
+1
-0
ocgcore/libcard.cpp
ocgcore/libcard.cpp
+30
-2
ocgcore/operations.cpp
ocgcore/operations.cpp
+2
-2
ocgcore/scriptlib.h
ocgcore/scriptlib.h
+1
-0
script/c1697104.lua
script/c1697104.lua
+1
-1
script/c25236056.lua
script/c25236056.lua
+1
-1
script/c2810642.lua
script/c2810642.lua
+1
-1
script/c38814750.lua
script/c38814750.lua
+1
-1
script/c40607210.lua
script/c40607210.lua
+1
-1
script/c55735315.lua
script/c55735315.lua
+1
-1
script/c58996430.lua
script/c58996430.lua
+1
-1
script/c73176465.lua
script/c73176465.lua
+1
-1
script/c74203495.lua
script/c74203495.lua
+1
-1
script/c75425043.lua
script/c75425043.lua
+1
-1
script/constant.lua
script/constant.lua
+6
-5
No files found.
ocgcore/card.cpp
View file @
834e2938
...
...
@@ -1796,7 +1796,7 @@ int32 card::is_equipable(card* pcard) {
int32
card
::
is_summonable
()
{
if
(
!
(
data
.
type
&
TYPE_MONSTER
))
return
FALSE
;
return
!
(
status
&
(
STATUS_REVIVE_LIMIT
|
STATUS_UNSUMMONABLE_CARD
)
);
return
!
is_affected_by_effect
(
EFFECT_UNSUMMONABLE_CARD
);
}
int32
card
::
is_summonable
(
effect
*
peffect
)
{
effect
*
oreason
=
pduel
->
game_field
->
core
.
reason_effect
;
...
...
@@ -1874,7 +1874,7 @@ int32 card::is_can_be_summoned(uint8 playerid, uint8 ignore_count, effect* peffe
return
FALSE
;
}
}
else
if
(
current
.
location
==
LOCATION_HAND
)
{
if
(
is_
status
(
STATUS_REVIVE_LIMIT
)
||
is_
affected_by_effect
(
EFFECT_CANNOT_SUMMON
))
{
if
(
is_affected_by_effect
(
EFFECT_CANNOT_SUMMON
))
{
pduel
->
game_field
->
restore_lp_cost
();
return
FALSE
;
}
...
...
@@ -2014,7 +2014,7 @@ int32 card::is_can_be_special_summoned(effect * reason_effect, uint32 sumtype, u
return
FALSE
;
if
(
current
.
location
==
LOCATION_REMOVED
&&
(
current
.
position
&
POS_FACEDOWN
))
return
FALSE
;
if
(
is_
status
(
STATUS
_REVIVE_LIMIT
)
&&
!
is_status
(
STATUS_PROC_COMPLETE
))
{
if
(
is_
affected_by_effect
(
EFFECT
_REVIVE_LIMIT
)
&&
!
is_status
(
STATUS_PROC_COMPLETE
))
{
if
((
!
nolimit
&&
(
current
.
location
&
0x38
))
||
(
!
nocheck
&&
!
nolimit
&&
(
current
.
location
&
0x3
)))
return
FALSE
;
if
(
!
nolimit
&&
(
data
.
type
&
TYPE_PENDULUM
)
&&
current
.
location
==
LOCATION_EXTRA
&&
(
current
.
position
&
POS_FACEUP
))
...
...
@@ -2070,7 +2070,7 @@ int32 card::is_can_be_special_summoned(effect * reason_effect, uint32 sumtype, u
int32
card
::
is_setable_mzone
(
uint8
playerid
,
uint8
ignore_count
,
effect
*
peffect
,
uint8
min_tribute
)
{
if
(
!
(
data
.
type
&
TYPE_MONSTER
))
return
FALSE
;
if
(
status
&
(
STATUS_REVIVE_LIMIT
|
STATUS
_UNSUMMONABLE_CARD
))
if
(
is_affected_by_effect
(
EFFECT
_UNSUMMONABLE_CARD
))
return
FALSE
;
if
(
current
.
location
!=
LOCATION_HAND
)
return
FALSE
;
...
...
ocgcore/effect.h
View file @
834e2938
...
...
@@ -378,6 +378,8 @@ public:
#define EFFECT_CANNOT_SELECT_BATTLE_TARGET 332
#define EFFECT_CANNOT_SELECT_EFFECT_TARGET 333
#define EFFECT_ADD_SETCODE 334
#define EFFECT_NO_EFFECT_DAMAGE 335
#define EFFECT_UNSUMMONABLE_CARD 336
#define EVENT_STARTUP 1000
#define EVENT_FLIP 1001
...
...
ocgcore/interpreter.cpp
View file @
834e2938
...
...
@@ -135,6 +135,7 @@ static const struct luaL_Reg cardlib[] = {
{
"IsRelateToCard"
,
scriptlib
::
card_is_relate_to_card
},
{
"IsRelateToBattle"
,
scriptlib
::
card_is_relate_to_battle
},
{
"CopyEffect"
,
scriptlib
::
card_copy_effect
},
{
"EnableUnsummonable"
,
scriptlib
::
card_enable_unsummonable
},
{
"EnableReviveLimit"
,
scriptlib
::
card_enable_revive_limit
},
{
"CompleteProcedure"
,
scriptlib
::
card_complete_procedure
},
{
"IsDisabled"
,
scriptlib
::
card_is_disabled
},
...
...
ocgcore/libcard.cpp
View file @
834e2938
...
...
@@ -1133,12 +1133,40 @@ int32 scriptlib::card_copy_effect(lua_State *L) {
lua_pushinteger
(
L
,
pcard
->
copy_effect
(
code
,
reset
,
count
));
return
1
;
}
int32
scriptlib
::
card_enable_unsummonable
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
duel
*
pduel
=
pcard
->
pduel
;
if
(
!
pcard
->
is_status
(
STATUS_COPYING_EFFECT
))
{
effect
*
peffect
=
pduel
->
new_effect
();
peffect
->
owner
=
pcard
;
peffect
->
code
=
EFFECT_UNSUMMONABLE_CARD
;
peffect
->
type
=
EFFECT_TYPE_SINGLE
;
peffect
->
flag
=
EFFECT_FLAG_CANNOT_DISABLE
|
EFFECT_FLAG_UNCOPYABLE
;
pcard
->
add_effect
(
peffect
);
}
return
0
;
}
int32
scriptlib
::
card_enable_revive_limit
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
if
(
!
pcard
->
is_status
(
STATUS_COPYING_EFFECT
))
pcard
->
set_status
(
STATUS_REVIVE_LIMIT
,
TRUE
);
duel
*
pduel
=
pcard
->
pduel
;
if
(
!
pcard
->
is_status
(
STATUS_COPYING_EFFECT
))
{
effect
*
peffect1
=
pduel
->
new_effect
();
peffect1
->
owner
=
pcard
;
peffect1
->
code
=
EFFECT_UNSUMMONABLE_CARD
;
peffect1
->
type
=
EFFECT_TYPE_SINGLE
;
peffect1
->
flag
=
EFFECT_FLAG_CANNOT_DISABLE
|
EFFECT_FLAG_UNCOPYABLE
;
pcard
->
add_effect
(
peffect1
);
effect
*
peffect2
=
pduel
->
new_effect
();
peffect2
->
owner
=
pcard
;
peffect2
->
code
=
EFFECT_REVIVE_LIMIT
;
peffect2
->
type
=
EFFECT_TYPE_SINGLE
;
peffect2
->
flag
=
EFFECT_FLAG_CANNOT_DISABLE
|
EFFECT_FLAG_UNCOPYABLE
;
pcard
->
add_effect
(
peffect2
);
}
return
0
;
}
int32
scriptlib
::
card_complete_procedure
(
lua_State
*
L
)
{
...
...
ocgcore/operations.cpp
View file @
834e2938
...
...
@@ -1666,7 +1666,7 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target) {
int32
field
::
mset
(
uint16
step
,
uint8
setplayer
,
card
*
target
,
effect
*
proc
,
uint8
ignore_count
,
uint8
min_tribute
)
{
switch
(
step
)
{
case
0
:
{
if
(
target
->
is_
status
(
STATUS_REVIVE_LIMIT
))
if
(
target
->
is_
affected_by_effect
(
EFFECT_UNSUMMONABLE_CARD
))
return
TRUE
;
if
(
target
->
current
.
location
!=
LOCATION_HAND
)
return
TRUE
;
...
...
@@ -2412,7 +2412,7 @@ int32 field::special_summon_step(uint16 step, group * targets, card * target) {
returns
.
ivalue
[
0
]
=
FALSE
;
uint32
result
=
TRUE
;
effect_set
eset
;
if
(
target
->
is_
status
(
STATUS
_REVIVE_LIMIT
)
&&
!
target
->
is_status
(
STATUS_PROC_COMPLETE
))
{
if
(
target
->
is_
affected_by_effect
(
EFFECT
_REVIVE_LIMIT
)
&&
!
target
->
is_status
(
STATUS_PROC_COMPLETE
))
{
if
((
!
nolimit
&&
(
target
->
current
.
location
&
0x38
))
||
(
!
nocheck
&&
!
nolimit
&&
(
target
->
current
.
location
&
0x3
)))
result
=
FALSE
;
}
...
...
ocgcore/scriptlib.h
View file @
834e2938
...
...
@@ -137,6 +137,7 @@ public:
static
int32
card_is_relate_to_card
(
lua_State
*
L
);
static
int32
card_is_relate_to_battle
(
lua_State
*
L
);
static
int32
card_copy_effect
(
lua_State
*
L
);
static
int32
card_enable_unsummonable
(
lua_State
*
L
);
static
int32
card_enable_revive_limit
(
lua_State
*
L
);
static
int32
card_complete_procedure
(
lua_State
*
L
);
static
int32
card_is_disabled
(
lua_State
*
L
);
...
...
script/c1697104.lua
View file @
834e2938
--PSYフレームギア・ε
function
c1697104
.
initial_effect
(
c
)
c
:
SetStatus
(
STATUS_UNSUMMONABLE_CARD
,
true
)
c
:
EnableUnsummonable
(
)
--splimit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
script/c25236056.lua
View file @
834e2938
--レアメタル・ドラゴン
function
c25236056
.
initial_effect
(
c
)
c
:
SetStatus
(
STATUS_UNSUMMONABLE_CARD
,
true
)
c
:
EnableUnsummonable
(
)
end
script/c2810642.lua
View file @
834e2938
--PSYフレームギア・β
function
c2810642
.
initial_effect
(
c
)
c
:
SetStatus
(
STATUS_UNSUMMONABLE_CARD
,
true
)
c
:
EnableUnsummonable
(
)
--splimit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
script/c38814750.lua
View file @
834e2938
--PSYフレームギア・γ
function
c38814750
.
initial_effect
(
c
)
c
:
SetStatus
(
STATUS_UNSUMMONABLE_CARD
,
true
)
c
:
EnableUnsummonable
(
)
--splimit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
script/c40607210.lua
View file @
834e2938
...
...
@@ -30,7 +30,7 @@ end
function
c40607210
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
re
:
GetHandler
()
return
rc
and
rc
:
IsRace
(
RACE_ZOMBIE
)
and
eg
:
IsExists
(
c40607210
.
cfilter
,
1
,
nil
,
tp
)
and
(
re
:
GetCode
()
~=
EFFECT_SPSUMMON_PROC
or
not
rc
:
Is
Status
(
STATUS
_REVIVE_LIMIT
))
and
(
re
:
GetCode
()
~=
EFFECT_SPSUMMON_PROC
or
not
rc
:
Is
HasEffect
(
EFFECT
_REVIVE_LIMIT
))
end
function
c40607210
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
2000
)
end
...
...
script/c55735315.lua
View file @
834e2938
--魂食神龍ドレイン・ドラゴン
function
c55735315
.
initial_effect
(
c
)
c
:
SetStatus
(
STATUS_UNSUMMONABLE_CARD
,
true
)
c
:
EnableUnsummonable
(
)
--spsummon condition
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
script/c58996430.lua
View file @
834e2938
--ライトロード・ビースト ウォルフ
function
c58996430
.
initial_effect
(
c
)
c
:
SetStatus
(
STATUS_UNSUMMONABLE_CARD
,
true
)
c
:
EnableUnsummonable
(
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
...
...
script/c73176465.lua
View file @
834e2938
--ライトロード・アーチャー フェリス
function
c73176465
.
initial_effect
(
c
)
c
:
SetStatus
(
STATUS_UNSUMMONABLE_CARD
,
true
)
c
:
EnableUnsummonable
(
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
73176465
,
0
))
...
...
script/c74203495.lua
View file @
834e2938
--PSYフレームギア・δ
function
c74203495
.
initial_effect
(
c
)
c
:
SetStatus
(
STATUS_UNSUMMONABLE_CARD
,
true
)
c
:
EnableUnsummonable
(
)
--splimit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
script/c75425043.lua
View file @
834e2938
--PSYフレームギア・α
function
c75425043
.
initial_effect
(
c
)
c
:
SetStatus
(
STATUS_UNSUMMONABLE_CARD
,
true
)
c
:
EnableUnsummonable
(
)
--splimit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
script/constant.lua
View file @
834e2938
...
...
@@ -130,7 +130,7 @@ STATUS_TO_DISABLE =0x0004 --将变成无效
STATUS_PROC_COMPLETE
=
0x0008
--完成正规召唤(解除苏生限制)
STATUS_SET_TURN
=
0x0010
--覆盖
STATUS_NO_LEVEL
=
0x0020
--无等级
STATUS_REVIVE_LIMIT
=
0x0040
--
未解除苏生限制
STATUS_REVIVE_LIMIT
=
0x0040
--
(N/A)
STATUS_SPSUMMON_STEP
=
0x0080
--效果特召處理中
STATUS_FORM_CHANGED
=
0x0100
--改变过表示形式
STATUS_SUMMONING
=
0x0200
--召唤中
...
...
@@ -143,7 +143,7 @@ STATUS_COPYING_EFFECT =0x8000 --复制效果
STATUS_CHAINING
=
0x10000
--正在連鎖串中
STATUS_SUMMON_DISABLED
=
0x20000
--召唤无效後尚未移動
STATUS_ACTIVATE_DISABLED
=
0x40000
--发动无效
STATUS_UNSUMMONABLE_CARD
=
0x80000
--
不能通常召唤
STATUS_UNSUMMONABLE_CARD
=
0x80000
--
(N/A)
STATUS_UNION
=
0x100000
--同盟
STATUS_ATTACK_CANCELED
=
0x200000
--攻击取消(卷回?)
STATUS_INITIALIZING
=
0x400000
--初始化..
...
...
@@ -298,8 +298,8 @@ EFFECT_CANNOT_DISABLE_SPSUMMON =27 --特殊召唤不会无效
EFFECT_SET_SUMMON_COUNT_LIMIT
=
28
--限制每回合放置怪兽次数
EFFECT_EXTRA_SUMMON_COUNT
=
29
--增加召唤(通常召唤)次数
EFFECT_SPSUMMON_CONDITION
=
30
--特殊召唤条件
EFFECT_REVIVE_LIMIT
=
31
--
苏生限制
EFFECT_SUMMON_PROC
=
32
--召唤规则
EFFECT_REVIVE_LIMIT
=
31
--
有苏生限制的怪獸
EFFECT_SUMMON_PROC
=
32
--召唤规则
效果
EFFECT_LIMIT_SUMMON_PROC
=
33
--召唤规则限制
EFFECT_SPSUMMON_PROC
=
34
--特殊召唤规则
EFFECT_EXTRA_SET_COUNT
=
35
--增加盖放(通常召唤)次数
...
...
@@ -476,6 +476,7 @@ EFFECT_CANNOT_SELECT_BATTLE_TARGET =332 --對手不能選擇為攻擊對象
EFFECT_CANNOT_SELECT_EFFECT_TARGET
=
333
--對手不能選擇為效果對象
EFFECT_ADD_SETCODE
=
334
--规则上视为「XX」字段
EFFECT_NO_EFFECT_DAMAGE
=
335
--玩家已受到"效果傷害變成0"的效果影響
EFFECT_UNSUMMONABLE_CARD
=
336
--不能通常召唤的怪獸
--下面是诱发效果的诱发事件、时点 (如果是TYPE_SINGLE则自己发生以下事件后触发,如果TYPE_FIELD则场上任何卡发生以下事件都触发)
EVENT_STARTUP
=
1000
--游戏开始时
...
...
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