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
29a40c4d
Commit
29a40c4d
authored
Sep 06, 2015
by
salix5
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1538 from DailyShana/patch-4
Immune effect of Qli monsters, revised
parents
eda6e68b
a24a58cb
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
20 additions
and
6 deletions
+20
-6
ocgcore/card.cpp
ocgcore/card.cpp
+3
-0
ocgcore/effect.h
ocgcore/effect.h
+1
-0
ocgcore/field.cpp
ocgcore/field.cpp
+3
-0
ocgcore/interpreter.cpp
ocgcore/interpreter.cpp
+1
-0
ocgcore/libeffect.cpp
ocgcore/libeffect.cpp
+7
-0
ocgcore/scriptlib.h
ocgcore/scriptlib.h
+1
-0
script/c15939229.lua
script/c15939229.lua
+1
-2
script/constant.lua
script/constant.lua
+1
-1
script/utility.lua
script/utility.lua
+2
-3
No files found.
ocgcore/card.cpp
View file @
29a40c4d
...
@@ -1068,6 +1068,9 @@ int32 card::add_effect(effect* peffect) {
...
@@ -1068,6 +1068,9 @@ int32 card::add_effect(effect* peffect) {
}
}
indexer
.
insert
(
make_pair
(
peffect
,
it
));
indexer
.
insert
(
make_pair
(
peffect
,
it
));
peffect
->
handler
=
this
;
peffect
->
handler
=
this
;
if
((
peffect
->
type
&
0x7e0
)
||
(
pduel
->
game_field
->
core
.
reason_effect
&&
(
pduel
->
game_field
->
core
.
reason_effect
->
status
&
EFFECT_STATUS_ACTIVATED
)))
peffect
->
status
|=
EFFECT_STATUS_ACTIVATED
;
if
(
peffect
->
in_range
(
current
.
location
,
current
.
sequence
)
&&
(
peffect
->
type
&
EFFECT_TYPE_FIELD
))
if
(
peffect
->
in_range
(
current
.
location
,
current
.
sequence
)
&&
(
peffect
->
type
&
EFFECT_TYPE_FIELD
))
pduel
->
game_field
->
add_effect
(
peffect
);
pduel
->
game_field
->
add_effect
(
peffect
);
if
(
current
.
controler
!=
PLAYER_NONE
&&
check_target
)
{
if
(
current
.
controler
!=
PLAYER_NONE
&&
check_target
)
{
...
...
ocgcore/effect.h
View file @
29a40c4d
...
@@ -90,6 +90,7 @@ public:
...
@@ -90,6 +90,7 @@ public:
//status
//status
#define EFFECT_STATUS_AVAILABLE 0x0001
#define EFFECT_STATUS_AVAILABLE 0x0001
#define EFFECT_STATUS_ACTIVATED 0x0002
#define EFFECT_COUNT_CODE_OATH 0x10000000
#define EFFECT_COUNT_CODE_OATH 0x10000000
#define EFFECT_COUNT_CODE_DUEL 0x20000000
#define EFFECT_COUNT_CODE_DUEL 0x20000000
...
...
ocgcore/field.cpp
View file @
29a40c4d
...
@@ -709,6 +709,9 @@ void field::add_effect(effect* peffect, uint8 owner_player) {
...
@@ -709,6 +709,9 @@ void field::add_effect(effect* peffect, uint8 owner_player) {
peffect
->
effect_owner
=
owner_player
;
peffect
->
effect_owner
=
owner_player
;
peffect
->
id
=
infos
.
field_id
++
;
peffect
->
id
=
infos
.
field_id
++
;
}
}
if
((
peffect
->
type
&
0x7e0
)
||
(
core
.
reason_effect
&&
(
core
.
reason_effect
->
status
&
EFFECT_STATUS_ACTIVATED
)))
peffect
->
status
|=
EFFECT_STATUS_ACTIVATED
;
peffect
->
card_type
=
peffect
->
owner
->
data
.
type
;
peffect
->
card_type
=
peffect
->
owner
->
data
.
type
;
effect_container
::
iterator
it
;
effect_container
::
iterator
it
;
if
(
!
(
peffect
->
type
&
EFFECT_TYPE_ACTIONS
))
{
if
(
!
(
peffect
->
type
&
EFFECT_TYPE_ACTIONS
))
{
...
...
ocgcore/interpreter.cpp
View file @
29a40c4d
...
@@ -265,6 +265,7 @@ static const struct luaL_Reg effectlib[] = {
...
@@ -265,6 +265,7 @@ static const struct luaL_Reg effectlib[] = {
{
"IsHasCategory"
,
scriptlib
::
effect_is_has_category
},
{
"IsHasCategory"
,
scriptlib
::
effect_is_has_category
},
{
"IsHasType"
,
scriptlib
::
effect_is_has_type
},
{
"IsHasType"
,
scriptlib
::
effect_is_has_type
},
{
"IsActivatable"
,
scriptlib
::
effect_is_activatable
},
{
"IsActivatable"
,
scriptlib
::
effect_is_activatable
},
{
"IsActivated"
,
scriptlib
::
effect_is_activated
},
{
"GetActivateLocation"
,
scriptlib
::
effect_get_activate_location
},
{
"GetActivateLocation"
,
scriptlib
::
effect_get_activate_location
},
{
NULL
,
NULL
}
{
NULL
,
NULL
}
};
};
...
...
ocgcore/libeffect.cpp
View file @
29a40c4d
...
@@ -526,6 +526,13 @@ int32 scriptlib::effect_is_activatable(lua_State *L) {
...
@@ -526,6 +526,13 @@ int32 scriptlib::effect_is_activatable(lua_State *L) {
lua_pushboolean
(
L
,
peffect
->
is_activateable
(
playerid
,
peffect
->
pduel
->
game_field
->
nil_event
));
lua_pushboolean
(
L
,
peffect
->
is_activateable
(
playerid
,
peffect
->
pduel
->
game_field
->
nil_event
));
return
1
;
return
1
;
}
}
int32
scriptlib
::
effect_is_activated
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_EFFECT
,
1
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
1
);
lua_pushboolean
(
L
,
(
peffect
->
status
&
EFFECT_STATUS_ACTIVATED
));
return
1
;
}
int32
scriptlib
::
effect_get_activate_location
(
lua_State
*
L
)
{
int32
scriptlib
::
effect_get_activate_location
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
...
...
ocgcore/scriptlib.h
View file @
29a40c4d
...
@@ -265,6 +265,7 @@ public:
...
@@ -265,6 +265,7 @@ public:
static
int32
effect_is_has_category
(
lua_State
*
L
);
static
int32
effect_is_has_category
(
lua_State
*
L
);
static
int32
effect_is_has_type
(
lua_State
*
L
);
static
int32
effect_is_has_type
(
lua_State
*
L
);
static
int32
effect_is_activatable
(
lua_State
*
L
);
static
int32
effect_is_activatable
(
lua_State
*
L
);
static
int32
effect_is_activated
(
lua_State
*
L
);
static
int32
effect_get_activate_location
(
lua_State
*
L
);
static
int32
effect_get_activate_location
(
lua_State
*
L
);
//Group functions
//Group functions
...
...
script/c15939229.lua
View file @
29a40c4d
...
@@ -38,7 +38,7 @@ function c15939229.sumsuc(e,tp,eg,ep,ev,re,r,rp)
...
@@ -38,7 +38,7 @@ function c15939229.sumsuc(e,tp,eg,ep,ev,re,r,rp)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CONTINUOUS
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
1
)
e1
:
SetTargetRange
(
1
,
1
)
e1
:
SetValue
(
c15939229
.
aclimit
)
e1
:
SetValue
(
c15939229
.
aclimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
...
@@ -46,7 +46,6 @@ function c15939229.sumsuc(e,tp,eg,ep,ev,re,r,rp)
...
@@ -46,7 +46,6 @@ function c15939229.sumsuc(e,tp,eg,ep,ev,re,r,rp)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_DISABLE
)
e2
:
SetCode
(
EFFECT_DISABLE
)
e2
:
SetProperty
(
EFFECT_FLAG_CONTINUOUS
)
e2
:
SetTargetRange
(
LOCATION_ONFIELD
,
LOCATION_ONFIELD
)
e2
:
SetTargetRange
(
LOCATION_ONFIELD
,
LOCATION_ONFIELD
)
e2
:
SetTarget
(
c15939229
.
disable
)
e2
:
SetTarget
(
c15939229
.
disable
)
e2
:
SetReset
(
RESET_PHASE
+
RESET_END
)
e2
:
SetReset
(
RESET_PHASE
+
RESET_END
)
...
...
script/constant.lua
View file @
29a40c4d
...
@@ -246,7 +246,7 @@ EFFECT_FLAG_IGNORE_RANGE =0x0020 --影响所有区域的卡(禁止令 大宇
...
@@ -246,7 +246,7 @@ EFFECT_FLAG_IGNORE_RANGE =0x0020 --影响所有区域的卡(禁止令 大宇
EFFECT_FLAG_ABSOLUTE_TARGET
=
0x0040
--Target Range不会因为控制权的改变而改变
EFFECT_FLAG_ABSOLUTE_TARGET
=
0x0040
--Target Range不会因为控制权的改变而改变
EFFECT_FLAG_IGNORE_IMMUNE
=
0x0080
--无视效果免疫
EFFECT_FLAG_IGNORE_IMMUNE
=
0x0080
--无视效果免疫
EFFECT_FLAG_SET_AVAILABLE
=
0x0100
--影响场上里侧的卡/裡側狀態可發動
EFFECT_FLAG_SET_AVAILABLE
=
0x0100
--影响场上里侧的卡/裡側狀態可發動
EFFECT_FLAG_CONTINUOUS
=
0x0200
--
由不入連鎖的效果產生的全局效果
EFFECT_FLAG_CONTINUOUS
=
0x0200
--
N/A
EFFECT_FLAG_CANNOT_DISABLE
=
0x0400
--不会被无效
EFFECT_FLAG_CANNOT_DISABLE
=
0x0400
--不会被无效
EFFECT_FLAG_PLAYER_TARGET
=
0x0800
--以玩家为对象
EFFECT_FLAG_PLAYER_TARGET
=
0x0800
--以玩家为对象
EFFECT_FLAG_BOTH_SIDE
=
0x1000
--双方都能使用(部分场地,弹压)
EFFECT_FLAG_BOTH_SIDE
=
0x1000
--双方都能使用(部分场地,弹压)
...
...
script/utility.lua
View file @
29a40c4d
...
@@ -1252,9 +1252,8 @@ function Auxiliary.damcon1(e,tp,eg,ep,ev,re,r,rp)
...
@@ -1252,9 +1252,8 @@ function Auxiliary.damcon1(e,tp,eg,ep,ev,re,r,rp)
end
end
--filter for the immune effetc of qli monsters
--filter for the immune effetc of qli monsters
function
Auxiliary
.
qlifilter
(
e
,
te
)
function
Auxiliary
.
qlifilter
(
e
,
te
)
if
te
:
IsActiveType
(
TYPE_MONSTER
)
if
te
:
IsActiveType
(
TYPE_MONSTER
)
and
(
te
:
IsHasType
(
0x7e0
)
or
(
te
:
IsHasProperty
(
EFFECT_FLAG_FIELD_ONLY
)
and
not
te
:
IsHasProperty
(
EFFECT_FLAG_CONTINUOUS
))
and
(
te
:
IsActivated
()
or
te
:
IsHasProperty
(
EFFECT_FLAG_OWNER_RELATE
))
then
or
te
:
IsHasProperty
(
EFFECT_FLAG_OWNER_RELATE
))
then
local
lv
=
e
:
GetHandler
():
GetLevel
()
local
lv
=
e
:
GetHandler
():
GetLevel
()
local
ec
=
te
:
GetOwner
()
local
ec
=
te
:
GetOwner
()
if
ec
:
IsType
(
TYPE_XYZ
)
then
if
ec
:
IsType
(
TYPE_XYZ
)
then
...
...
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