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
b63d8515
Commit
b63d8515
authored
Jan 16, 2015
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
battle destroy
parent
d5708cf8
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
59 additions
and
81 deletions
+59
-81
ocgcore/card.h
ocgcore/card.h
+1
-0
ocgcore/processor.cpp
ocgcore/processor.cpp
+13
-6
script/c10032958.lua
script/c10032958.lua
+1
-6
script/c11012887.lua
script/c11012887.lua
+1
-4
script/c11224103.lua
script/c11224103.lua
+1
-0
script/c11682713.lua
script/c11682713.lua
+1
-7
script/c12079734.lua
script/c12079734.lua
+1
-5
script/c12174035.lua
script/c12174035.lua
+1
-1
script/c12927849.lua
script/c12927849.lua
+1
-1
script/c13386503.lua
script/c13386503.lua
+1
-7
script/c13438207.lua
script/c13438207.lua
+1
-1
script/c13521194.lua
script/c13521194.lua
+1
-1
script/c14089428.lua
script/c14089428.lua
+1
-0
script/c15013468.lua
script/c15013468.lua
+1
-1
script/c16909657.lua
script/c16909657.lua
+3
-15
script/c17185260.lua
script/c17185260.lua
+1
-6
script/c17706537.lua
script/c17706537.lua
+1
-6
script/c17948378.lua
script/c17948378.lua
+1
-0
script/c1945387.lua
script/c1945387.lua
+1
-5
script/c58820853.lua
script/c58820853.lua
+1
-1
script/c80321197.lua
script/c80321197.lua
+1
-1
script/constant.lua
script/constant.lua
+7
-6
script/utility.lua
script/utility.lua
+17
-1
No files found.
ocgcore/card.h
View file @
b63d8515
...
...
@@ -398,6 +398,7 @@ public:
#define STATUS_CONTINUOUS_POS 0x2000000
#define STATUS_IS_PUBLIC 0x4000000
#define STATUS_ACT_FROM_HAND 0x8000000
#define STATUS_SELF_BATTLE 0x10000000
//Counter
#define COUNTER_NEED_PERMIT 0x1000
#define COUNTER_NEED_ENABLE 0x2000
...
...
ocgcore/processor.cpp
View file @
b63d8515
...
...
@@ -3484,6 +3484,10 @@ int32 field::process_battle_command(uint16 step) {
core
.
attack_target
->
q_cache
.
defence
=
dd
;
core
.
attack_target
->
set_status
(
STATUS_BATTLE_DESTROYED
,
FALSE
);
pd
=
core
.
attack_target
->
current
.
controler
;
if
(
pa
==
pd
){
core
.
attacker
->
set_status
(
STATUS_SELF_BATTLE
,
TRUE
);
core
.
attack_target
->
set_status
(
STATUS_SELF_BATTLE
,
TRUE
);
}
if
(
core
.
attack_target
->
is_position
(
POS_ATTACK
))
{
d
=
da
;
if
(
a
>
d
)
{
...
...
@@ -3673,7 +3677,7 @@ int32 field::process_battle_command(uint16 step) {
break_effect
();
}
core
.
damage_calculated
=
TRUE
;
if
(
core
.
effect_damage_step
&&
core
.
current_chain
.
size
()
<=
1
)
if
(
core
.
effect_damage_step
)
return
TRUE
;
return
FALSE
;
}
...
...
@@ -3785,7 +3789,7 @@ int32 field::process_battle_command(uint16 step) {
//raise_event((card*)0, EVENT_BATTLE_END, 0, 0, PLAYER_NONE, 0, 0);
//process_single_event();
//process_instant_event();
if
(
!
core
.
effect_damage_step
||
(
(
core
.
effect_damage_step
!=
3
)
&&
(
core
.
current_chain
.
size
()
<=
1
)
))
{
if
(
!
core
.
effect_damage_step
||
(
core
.
effect_damage_step
!=
3
))
{
//add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, TRUE);
core
.
units
.
begin
()
->
arg1
=
1
;
}
else
{
...
...
@@ -3805,7 +3809,7 @@ int32 field::process_battle_command(uint16 step) {
process_single_event
();
process_instant_event
();
}
if
(
!
core
.
effect_damage_step
||
(
(
core
.
effect_damage_step
!=
3
)
&&
(
core
.
current_chain
.
size
()
<=
1
)
))
{
if
(
!
core
.
effect_damage_step
||
(
core
.
effect_damage_step
!=
3
))
{
if
(
core
.
new_fchain
.
size
()
||
core
.
new_ochain
.
size
())
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
FALSE
);
}
else
{
...
...
@@ -3857,9 +3861,12 @@ int32 field::process_battle_command(uint16 step) {
process_single_event
();
process_instant_event
();
core
.
attacker
->
set_status
(
STATUS_BATTLE_DESTROYED
,
FALSE
);
if
(
core
.
attack_target
)
core
.
attacker
->
set_status
(
STATUS_SELF_BATTLE
,
FALSE
);
if
(
core
.
attack_target
){
core
.
attack_target
->
set_status
(
STATUS_BATTLE_DESTROYED
,
FALSE
);
if
(
!
core
.
effect_damage_step
||
((
core
.
effect_damage_step
!=
3
)
&&
(
core
.
current_chain
.
size
()
<=
1
)))
{
core
.
attack_target
->
set_status
(
STATUS_SELF_BATTLE
,
FALSE
);
}
if
(
!
core
.
effect_damage_step
||
(
core
.
effect_damage_step
!=
3
))
{
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
FALSE
);
}
else
{
break_effect
();
...
...
@@ -3952,7 +3959,7 @@ int32 field::process_damage_step(uint16 step) {
process_single_event
();
process_instant_event
();
add_process
(
PROCESSOR_BATTLE_COMMAND
,
26
,
0
,
0
,
0
,
0
);
if
(
core
.
current_chain
.
size
()
>
1
||
core
.
units
.
begin
()
->
arg2
)
{
//skip timing
if
(
core
.
units
.
begin
()
->
arg2
)
{
//skip timing
core
.
units
.
begin
()
->
step
=
2
;
core
.
effect_damage_step
=
3
;
add_process
(
PROCESSOR_BATTLE_COMMAND
,
27
,
0
,
0
,
0
,
0
);
...
...
script/c10032958.lua
View file @
b63d8515
...
...
@@ -58,7 +58,7 @@ function c10032958.reg(c,opt)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e1
:
SetCondition
(
c10032958
.
dam
con
)
e1
:
SetCondition
(
aux
.
bdg
con
)
e1
:
SetTarget
(
c10032958
.
damtg
)
e1
:
SetOperation
(
c10032958
.
damop
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
...
...
@@ -73,11 +73,6 @@ end
function
c10032958
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChainAttack
()
end
function
c10032958
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
c
:
IsRelateToBattle
()
and
bc
:
IsLocation
(
LOCATION_GRAVE
)
and
bc
:
IsType
(
TYPE_MONSTER
)
end
function
c10032958
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
c
=
e
:
GetHandler
()
...
...
script/c11012887.lua
View file @
b63d8515
...
...
@@ -6,14 +6,11 @@ function c11012887.initial_effect(c)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e1
:
SetCondition
(
c11012887
.
conditi
on
)
e1
:
SetCondition
(
aux
.
bdoc
on
)
e1
:
SetTarget
(
c11012887
.
target
)
e1
:
SetOperation
(
c11012887
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c11012887
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsRelateToBattle
()
end
function
c11012887
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x22
)
and
c
:
IsAttackBelow
(
1700
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
...
...
script/c11224103.lua
View file @
b63d8515
...
...
@@ -4,6 +4,7 @@ function c11224103.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e1
:
SetCondition
(
aux
.
bdcon
)
e1
:
SetOperation
(
c11224103
.
bdop
)
c
:
RegisterEffect
(
e1
)
--immune spell
...
...
script/c11682713.lua
View file @
b63d8515
...
...
@@ -5,7 +5,7 @@ function c11682713.initial_effect(c)
e1
:
SetDescription
(
aux
.
Stringid
(
11682713
,
0
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e1
:
SetCondition
(
c11682713
.
conditi
on
)
e1
:
SetCondition
(
aux
.
bdogc
on
)
e1
:
SetTarget
(
c11682713
.
target
)
e1
:
SetOperation
(
c11682713
.
operation
)
c
:
RegisterEffect
(
e1
)
...
...
@@ -20,12 +20,6 @@ function c11682713.initial_effect(c)
e2
:
SetOperation
(
c11682713
.
tdop
)
c
:
RegisterEffect
(
e2
)
end
function
c11682713
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
c
:
IsRelateToBattle
()
and
c
:
IsFaceup
()
and
bc
:
IsLocation
(
LOCATION_GRAVE
)
and
bc
:
IsType
(
TYPE_MONSTER
)
and
bc
:
IsReason
(
REASON_BATTLE
)
end
function
c11682713
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>
0
end
end
...
...
script/c12079734.lua
View file @
b63d8515
...
...
@@ -6,15 +6,11 @@ function c12079734.initial_effect(c)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e1
:
SetCondition
(
c12079734
.
conditi
on
)
e1
:
SetCondition
(
aux
.
bdoc
on
)
e1
:
SetTarget
(
c12079734
.
target
)
e1
:
SetOperation
(
c12079734
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c12079734
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsRelateToBattle
()
and
c
:
GetBattleTarget
():
IsType
(
TYPE_MONSTER
)
end
function
c12079734
.
filter1
(
c
,
ec
)
return
c
:
IsType
(
TYPE_UNION
)
and
c
:
CheckEquipTarget
(
ec
)
end
...
...
script/c12174035.lua
View file @
b63d8515
...
...
@@ -49,7 +49,7 @@ function c12174035.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c12174035
.
hdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
GetFirst
()
==
e
:
GetHandler
():
GetEquipTarget
()
return
eg
:
GetFirst
()
==
e
:
GetHandler
():
GetEquipTarget
()
and
not
eg
:
GetFirst
():
IsStatus
(
STATUS_SELF_BATTLE
)
end
function
c12174035
.
hdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
...
...
script/c12927849.lua
View file @
b63d8515
...
...
@@ -82,7 +82,7 @@ end
function
c12927849
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ec
=
eg
:
GetFirst
()
local
bc
=
ec
:
GetBattleTarget
()
return
ec
==
e
:
GetHandler
():
GetEquipTarget
()
and
bc
:
IsLocation
(
LOCATION_GRAVE
)
and
bc
:
IsReason
(
REASON_BATTLE
)
return
ec
==
e
:
GetHandler
():
GetEquipTarget
()
and
not
ec
:
IsStatus
(
STATUS_SELF_BATTLE
)
and
bc
:
IsLocation
(
LOCATION_GRAVE
)
and
bc
:
IsType
(
TYPE_MONSTER
)
end
function
c12927849
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x7e
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
...
...
script/c13386503.lua
View file @
b63d8515
...
...
@@ -6,17 +6,11 @@ function c13386503.initial_effect(c)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCondition
(
c13386503
.
sp
con
)
e1
:
SetCondition
(
aux
.
bdog
con
)
e1
:
SetTarget
(
c13386503
.
sptg
)
e1
:
SetOperation
(
c13386503
.
spop
)
c
:
RegisterEffect
(
e1
)
end
function
c13386503
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
if
not
c
:
IsRelateToBattle
()
or
c
:
IsFacedown
()
then
return
false
end
return
bc
:
IsLocation
(
LOCATION_GRAVE
)
and
bc
:
IsType
(
TYPE_MONSTER
)
end
function
c13386503
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
bc
=
e
:
GetHandler
():
GetBattleTarget
()
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
...
...
script/c13438207.lua
View file @
b63d8515
...
...
@@ -14,7 +14,7 @@ end
function
c13438207
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
local
bc
=
tc
:
GetBattleTarget
()
return
eg
:
GetCount
()
==
1
and
tc
:
IsControler
(
tp
)
and
tc
:
IsRace
(
RACE_PLANT
)
return
tc
:
IsRelateToBattle
()
and
not
tc
:
IsStatus
(
STATUS_SELF_BATTLE
)
and
tc
:
IsControler
(
tp
)
and
tc
:
IsRace
(
RACE_PLANT
)
and
bc
:
IsLocation
(
LOCATION_GRAVE
)
and
bc
:
IsReason
(
REASON_BATTLE
)
end
function
c13438207
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
script/c13521194.lua
View file @
b63d8515
...
...
@@ -6,7 +6,7 @@ function c13521194.initial_effect(c)
e1
:
SetCategory
(
CATEGORY_DAMAGE
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCondition
(
aux
.
bd
con1
)
e1
:
SetCondition
(
aux
.
bd
gcon
)
e1
:
SetTarget
(
c13521194
.
damtarget
)
e1
:
SetOperation
(
c13521194
.
damoperation
)
c
:
RegisterEffect
(
e1
)
...
...
script/c14089428.lua
View file @
b63d8515
...
...
@@ -5,6 +5,7 @@ function c14089428.initial_effect(c)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e1
:
SetCondition
(
aux
.
bdocon
)
e1
:
SetTarget
(
c14089428
.
target
)
e1
:
SetOperation
(
c14089428
.
operation
)
c
:
RegisterEffect
(
e1
)
...
...
script/c15013468.lua
View file @
b63d8515
...
...
@@ -58,7 +58,7 @@ end
function
c15013468
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
c
:
IsRelateToBattle
()
and
b
c
:
IsType
(
TYPE_MONSTER
)
and
b
it
.
band
(
bc
:
GetBattlePosition
(),
POS_DEFENCE
)
~=
0
return
c
:
IsRelateToBattle
()
and
bit
.
band
(
bc
:
GetBattlePosition
(),
POS_DEFENCE
)
~=
0
end
function
c15013468
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
...
...
script/c16909657.lua
View file @
b63d8515
--レプティレス・スキュラ
function
c16909657
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_BATTLED
)
e1
:
SetOperation
(
c16909657
.
checkop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
16909657
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
...
...
@@ -17,17 +12,10 @@ function c16909657.initial_effect(c)
e2
:
SetLabelObject
(
e1
)
c
:
RegisterEffect
(
e2
)
end
function
c16909657
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
t
=
Duel
.
GetAttackTarget
()
if
ev
==
1
then
t
=
Duel
.
GetAttacker
()
end
e
:
SetLabelObject
(
t
)
if
t
then
e
:
SetLabel
(
t
:
GetAttack
())
end
end
function
c16909657
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
():
GetLabelObject
()
local
atk
=
e
:
GetLabelObject
():
GetLabel
()
return
tc
and
tc
:
IsLocation
(
LOCATION_GRAVE
)
and
atk
==
0
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
c
:
IsRelateToBattle
()
and
bc
:
GetPreviousAttackOnField
()
==
0
end
function
c16909657
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tc
=
e
:
GetLabelObject
():
GetLabelObject
()
...
...
script/c17185260.lua
View file @
b63d8515
...
...
@@ -7,16 +7,11 @@ function c17185260.initial_effect(c)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e1
:
SetCondition
(
c17185260
.
pos
con
)
e1
:
SetCondition
(
aux
.
bdog
con
)
e1
:
SetTarget
(
c17185260
.
postg
)
e1
:
SetOperation
(
c17185260
.
posop
)
c
:
RegisterEffect
(
e1
)
end
function
c17185260
.
poscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
c
:
IsRelateToBattle
()
and
c
:
IsFaceup
()
and
bc
:
IsLocation
(
LOCATION_GRAVE
)
and
bc
:
IsReason
(
REASON_BATTLE
)
end
function
c17185260
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCanTurnSet
()
end
...
...
script/c17706537.lua
View file @
b63d8515
...
...
@@ -6,16 +6,11 @@ function c17706537.initial_effect(c)
e1
:
SetCategory
(
CATEGORY_DAMAGE
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCondition
(
c17706537
.
dam
con
)
e1
:
SetCondition
(
aux
.
bdog
con
)
e1
:
SetTarget
(
c17706537
.
damtg
)
e1
:
SetOperation
(
c17706537
.
damop
)
c
:
RegisterEffect
(
e1
)
end
function
c17706537
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
c
:
IsRelateToBattle
()
and
bc
:
IsLocation
(
LOCATION_GRAVE
)
and
bc
:
IsReason
(
REASON_BATTLE
)
end
function
c17706537
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
1
-
tp
)
...
...
script/c17948378.lua
View file @
b63d8515
...
...
@@ -4,6 +4,7 @@ function c17948378.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e1
:
SetCondition
(
aux
.
bdocon
)
e1
:
SetOperation
(
c17948378
.
regop
)
c
:
RegisterEffect
(
e1
)
--draw
...
...
script/c1945387.lua
View file @
b63d8515
...
...
@@ -17,7 +17,7 @@ function c1945387.initial_effect(c)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e2
:
SetCondition
(
c1945387
.
dr
con
)
e2
:
SetCondition
(
aux
.
bdo
con
)
e2
:
SetTarget
(
c1945387
.
drtg
)
e2
:
SetOperation
(
c1945387
.
drop
)
c
:
RegisterEffect
(
e2
)
...
...
@@ -25,10 +25,6 @@ end
function
c1945387
.
splimit
(
e
,
se
,
sp
,
st
)
return
bit
.
band
(
st
,
SUMMON_TYPE_FUSION
)
==
SUMMON_TYPE_FUSION
end
function
c1945387
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsRelateToBattle
()
and
c
:
GetBattleTarget
():
IsType
(
TYPE_MONSTER
)
end
function
c1945387
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
tp
)
...
...
script/c58820853.lua
View file @
b63d8515
...
...
@@ -6,7 +6,7 @@ function c58820853.initial_effect(c)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e1
:
SetCondition
(
aux
.
bd
con1
)
e1
:
SetCondition
(
aux
.
bd
ogcon
)
e1
:
SetTarget
(
c58820853
.
target
)
e1
:
SetOperation
(
c58820853
.
operation
)
c
:
RegisterEffect
(
e1
)
...
...
script/c80321197.lua
View file @
b63d8515
...
...
@@ -8,7 +8,7 @@ function c80321197.initial_effect(c)
e1
:
SetDescription
(
aux
.
Stringid
(
80321197
,
0
))
e1
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCondition
(
aux
.
bd
con1
)
e1
:
SetCondition
(
aux
.
bd
ogcon
)
e1
:
SetOperation
(
c80321197
.
spop
)
c
:
RegisterEffect
(
e1
)
end
...
...
script/constant.lua
View file @
b63d8515
...
...
@@ -148,6 +148,7 @@ STATUS_JUST_POS =0x1000000 --
STATUS_CONTINUOUS_POS
=
0x2000000
--连续变更表示形式?
STATUS_IS_PUBLIC
=
0x4000000
--公开展示
STATUS_ACT_FROM_HAND
=
0x8000000
--在手牌发动
STATUS_SELF_BATTLE
=
0x10000000
--和自己的怪兽戰鬥
--Assume
ASSUME_CODE
=
1
ASSUME_TYPE
=
2
...
...
@@ -198,12 +199,12 @@ RESET_MAIN2 =PHASE_MAIN2 --主要阶段2重置
RESET_END
=
PHASE_END
--结束阶段重置
RESET_SELF_TURN
=
0x0100
--自己回合结束重置
RESET_OPPO_TURN
=
0x0200
--对方回合结束重置
RESET_PHASE
=
0x0400
--阶段结束重置
(一般和上面那些阶段配合使用
RESET_PHASE
=
0x0400
--阶段结束重置
(一般和上面那些阶段配合使用)
RESET_CHAIN
=
0x0800
--连锁结束重置
RESET_EVENT
=
0x1000
--
不明(一般和下面这些事件配合使用
RESET_CARD
=
0x2000
RESET_CODE
=
0x4000
--
卡名改变重置
RESET_COPY
=
0x8000
--
复制效果重置
RESET_EVENT
=
0x1000
--
指定的條件下重置(一般和下面这些事件配合使用)
RESET_CARD
=
0x2000
--重置Owner為指定卡片的效果
RESET_CODE
=
0x4000
--
重置指定Code的效果
RESET_COPY
=
0x8000
--
重置以复制取得的效果
RESET_DISABLE
=
0x00010000
--效果无效重置
RESET_TURN_SET
=
0x00020000
--变里侧重置
RESET_TOGRAVE
=
0x00040000
--去墓地重置
...
...
@@ -213,7 +214,7 @@ RESET_TOHAND =0x00200000 --回手牌或加入手牌重置
RESET_TODECK
=
0x00400000
--回卡组重置
RESET_LEAVE
=
0x00800000
--从场上离开重置
RESET_TOFIELD
=
0x01000000
--到场上重置
RESET_CONTROL
=
0x02000000
--控制
器
变更重置
RESET_CONTROL
=
0x02000000
--控制
者
变更重置
RESET_OVERLAY
=
0x04000000
--超量叠放重置
--========== Types ========== --效果类型(定义效果触发类型,和codes一起使用)
EFFECT_TYPE_SINGLE
=
0x0001
--自己状态变化时触发
...
...
script/utility.lua
View file @
b63d8515
...
...
@@ -952,9 +952,25 @@ function Auxiliary.atrst(e,tp,eg,ep,ev,re,r,rp)
local
e1
=
e
:
GetLabelObject
()
if
eg
:
GetFirst
()
~=
e1
:
GetHandler
()
then
e1
:
Reset
()
end
end
function
Auxiliary
.
bdcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
Auxiliary
.
bdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
--condition of EVENT_BATTLE_DESTROYING
local
c
=
e
:
GetHandler
()
return
c
:
IsRelateToBattle
()
end
function
Auxiliary
.
bdocon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
--condition of EVENT_BATTLE_DESTROYING + opponent monster
local
c
=
e
:
GetHandler
()
return
c
:
IsRelateToBattle
()
and
not
c
:
IsStatus
(
STATUS_SELF_BATTLE
)
end
function
Auxiliary
.
bdgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
--condition of EVENT_BATTLE_DESTROYING + to_grave
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
c
:
IsRelateToBattle
()
and
bc
:
IsLocation
(
LOCATION_GRAVE
)
and
bc
:
IsType
(
TYPE_MONSTER
)
end
function
Auxiliary
.
bdogcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
--condition of EVENT_BATTLE_DESTROYING + opponent monster + to_grave
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
c
:
IsRelateToBattle
()
and
not
c
:
IsStatus
(
STATUS_SELF_BATTLE
)
and
bc
:
IsLocation
(
LOCATION_GRAVE
)
and
bc
:
IsType
(
TYPE_MONSTER
)
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