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
6b5f82a9
Commit
6b5f82a9
authored
Jan 18, 2015
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chain attack
parent
d3a8d9d3
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
179 additions
and
60 deletions
+179
-60
ocgcore/card.h
ocgcore/card.h
+1
-1
ocgcore/libcard.cpp
ocgcore/libcard.cpp
+5
-5
ocgcore/processor.cpp
ocgcore/processor.cpp
+5
-5
script/c10032958.lua
script/c10032958.lua
+1
-1
script/c12174035.lua
script/c12174035.lua
+1
-1
script/c12927849.lua
script/c12927849.lua
+1
-1
script/c13438207.lua
script/c13438207.lua
+1
-1
script/c18013090.lua
script/c18013090.lua
+40
-1
script/c21435914.lua
script/c21435914.lua
+1
-2
script/c23118924.lua
script/c23118924.lua
+1
-1
script/c30314994.lua
script/c30314994.lua
+1
-1
script/c33823832.lua
script/c33823832.lua
+1
-1
script/c35638627.lua
script/c35638627.lua
+1
-1
script/c35884610.lua
script/c35884610.lua
+0
-7
script/c46427957.lua
script/c46427957.lua
+1
-1
script/c49202331.lua
script/c49202331.lua
+2
-6
script/c57274196.lua
script/c57274196.lua
+1
-1
script/c58272005.lua
script/c58272005.lua
+1
-1
script/c6330307.lua
script/c6330307.lua
+41
-3
script/c65260293.lua
script/c65260293.lua
+1
-1
script/c65676461.lua
script/c65676461.lua
+2
-2
script/c69069911.lua
script/c69069911.lua
+2
-2
script/c72989439.lua
script/c72989439.lua
+1
-1
script/c75292259.lua
script/c75292259.lua
+41
-1
script/c80367387.lua
script/c80367387.lua
+1
-1
script/c86137485.lua
script/c86137485.lua
+21
-6
script/c88301393.lua
script/c88301393.lua
+1
-2
script/constant.lua
script/constant.lua
+1
-1
script/utility.lua
script/utility.lua
+2
-2
No files found.
ocgcore/card.h
View file @
6b5f82a9
...
...
@@ -398,7 +398,7 @@ public:
#define STATUS_CONTINUOUS_POS 0x2000000
#define STATUS_IS_PUBLIC 0x4000000
#define STATUS_ACT_FROM_HAND 0x8000000
#define STATUS_
SELF
_BATTLE 0x10000000
#define STATUS_
OPPO
_BATTLE 0x10000000
//Counter
#define COUNTER_NEED_PERMIT 0x1000
#define COUNTER_NEED_ENABLE 0x2000
...
...
ocgcore/libcard.cpp
View file @
6b5f82a9
...
...
@@ -1414,12 +1414,12 @@ int32 scriptlib::card_is_chain_attackable(lua_State *L) {
if
(
lua_gettop
(
L
)
>
2
)
monsteronly
=
lua_toboolean
(
L
,
3
);
card
*
attacker
=
pduel
->
game_field
->
core
.
attacker
;
if
(
pduel
->
game_field
->
core
.
effect_damage_step
||
attacker
->
is_status
(
STATUS_BATTLE_DESTROYED
)
if
(
attacker
->
is_status
(
STATUS_BATTLE_DESTROYED
)
||
attacker
->
current
.
controler
!=
pduel
->
game_field
->
infos
.
turn_player
||
attacker
->
fieldid_r
!=
pduel
->
game_field
->
core
.
pre_field
[
0
]
||
!
attacker
->
is_capable_attack_announce
(
pduel
->
game_field
->
infos
.
turn_player
)
||
(
ac
!=
0
&&
attacker
->
announce_count
>=
ac
))
{
||
attacker
->
fieldid_r
!=
pduel
->
game_field
->
core
.
pre_field
[
0
]
||
!
attacker
->
is_capable_attack_announce
(
pduel
->
game_field
->
infos
.
turn_player
)
||
(
ac
!=
0
&&
attacker
->
announce_count
>=
ac
)
||
(
ac
==
2
&&
attacker
->
is_affected_by_effect
(
EFFECT_EXTRA_ATTACK
)))
{
lua_pushboolean
(
L
,
0
);
return
1
;
}
...
...
ocgcore/processor.cpp
View file @
6b5f82a9
...
...
@@ -3484,9 +3484,9 @@ 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
(
pa
!
=
pd
){
core
.
attacker
->
set_status
(
STATUS_
OPPO
_BATTLE
,
TRUE
);
core
.
attack_target
->
set_status
(
STATUS_
OPPO
_BATTLE
,
TRUE
);
}
if
(
core
.
attack_target
->
is_position
(
POS_ATTACK
))
{
d
=
da
;
...
...
@@ -3861,10 +3861,10 @@ int32 field::process_battle_command(uint16 step) {
process_single_event
();
process_instant_event
();
core
.
attacker
->
set_status
(
STATUS_BATTLE_DESTROYED
,
FALSE
);
core
.
attacker
->
set_status
(
STATUS_
SELF
_BATTLE
,
FALSE
);
core
.
attacker
->
set_status
(
STATUS_
OPPO
_BATTLE
,
FALSE
);
if
(
core
.
attack_target
){
core
.
attack_target
->
set_status
(
STATUS_BATTLE_DESTROYED
,
FALSE
);
core
.
attack_target
->
set_status
(
STATUS_
SELF
_BATTLE
,
FALSE
);
core
.
attack_target
->
set_status
(
STATUS_
OPPO
_BATTLE
,
FALSE
);
}
if
(
!
core
.
effect_damage_step
||
(
core
.
effect_damage_step
!=
3
))
{
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
FALSE
);
...
...
script/c10032958.lua
View file @
6b5f82a9
...
...
@@ -68,7 +68,7 @@ end
function
c10032958
.
atcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
c
:
IsChainAttackable
()
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
c
:
IsChainAttackable
()
and
c
:
IsStatus
(
STATUS_OPPO_BATTLE
)
end
function
c10032958
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
script/c12174035.lua
View file @
6b5f82a9
...
...
@@ -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
()
and
not
eg
:
GetFirst
():
IsStatus
(
STATUS_SELF
_BATTLE
)
return
eg
:
GetFirst
()
==
e
:
GetHandler
():
GetEquipTarget
()
and
eg
:
GetFirst
():
IsStatus
(
STATUS_OPPO
_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 @
6b5f82a9
...
...
@@ -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
not
ec
:
IsStatus
(
STATUS_SELF
_BATTLE
)
and
bc
:
IsLocation
(
LOCATION_GRAVE
)
and
bc
:
IsType
(
TYPE_MONSTER
)
return
ec
==
e
:
GetHandler
():
GetEquipTarget
()
and
ec
:
IsStatus
(
STATUS_OPPO
_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/c13438207.lua
View file @
6b5f82a9
...
...
@@ -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
tc
:
IsRelateToBattle
()
and
not
tc
:
IsStatus
(
STATUS_SELF
_BATTLE
)
and
tc
:
IsControler
(
tp
)
and
tc
:
IsRace
(
RACE_PLANT
)
return
tc
:
IsRelateToBattle
()
and
tc
:
IsStatus
(
STATUS_OPPO
_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/c18013090.lua
View file @
6b5f82a9
...
...
@@ -68,8 +68,47 @@ function c18013090.catg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function
c18013090
.
caop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
c
=
e
:
GetHandler
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
Duel
.
ChangePosition
(
tc
,
POS_FACEUP_ATTACK
)
Duel
.
ChainAttack
(
tc
)
--Duel.ChainAttack(tc)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_BATTLE
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_CANNOT_DIRECT_ATTACK
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_BATTLE
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_BATTLE_TARGET
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e3
:
SetLabelObject
(
tc
)
e3
:
SetTarget
(
c18013090
.
exttg
)
e3
:
SetValue
(
c18013090
.
extval
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_BATTLE
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e4
:
SetLabelObject
(
e1
)
e4
:
SetOperation
(
aux
.
atrst
)
e4
:
SetReset
(
RESET_PHASE
+
PHASE_BATTLE
)
Duel
.
RegisterEffect
(
e4
,
tp
)
end
end
function
c18013090
.
exttg
(
e
,
c
)
local
tc
=
e
:
GetLabelObject
()
return
c
~=
tc
end
function
c18013090
.
extval
(
e
,
c
)
return
c
==
e
:
GetHandler
()
end
script/c21435914.lua
View file @
6b5f82a9
...
...
@@ -32,8 +32,7 @@ end
function
c21435914
.
atcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
bc
:
IsLocation
(
LOCATION_GRAVE
)
and
bc
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsChainAttackable
(
2
,
true
)
and
not
c
:
IsHasEffect
(
EFFECT_EXTRA_ATTACK
)
and
not
c
:
IsStatus
(
STATUS_SELF_BATTLE
)
return
bc
:
IsLocation
(
LOCATION_GRAVE
)
and
bc
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsChainAttackable
(
2
,
true
)
and
c
:
IsStatus
(
STATUS_OPPO_BATTLE
)
end
function
c21435914
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
script/c23118924.lua
View file @
6b5f82a9
...
...
@@ -42,7 +42,7 @@ end
function
c23118924
.
atcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
c
:
IsChainAttackable
()
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
c
:
IsChainAttackable
()
and
c
:
IsStatus
(
STATUS_OPPO_BATTLE
)
and
not
c
:
IsDisabled
()
and
Duel
.
IsExistingMatchingCard
(
c23118924
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
ATTRIBUTE_WIND
)
end
function
c23118924
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c30314994.lua
View file @
6b5f82a9
...
...
@@ -27,7 +27,7 @@ end
function
c30314994
.
atcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
c
:
IsChainAttackable
()
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
c
:
IsChainAttackable
()
and
c
:
IsStatus
(
STATUS_OPPO_BATTLE
)
and
not
c
:
IsDisabled
()
and
Duel
.
IsExistingMatchingCard
(
c30314994
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
ATTRIBUTE_WIND
)
end
function
c30314994
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c33823832.lua
View file @
6b5f82a9
...
...
@@ -50,7 +50,7 @@ function c33823832.cacon(e,tp,eg,ep,ev,re,r,rp)
local
a
=
Duel
.
GetAttacker
()
local
d
=
Duel
.
GetAttackTarget
()
if
not
d
then
return
false
end
if
d
:
IsControler
(
tp
)
then
a
,
d
=
d
,
a
end
if
a
:
IsStatus
(
STATUS_OPPO_BATTLE
)
and
d
:
IsControler
(
tp
)
then
a
,
d
=
d
,
a
end
if
a
:
IsType
(
TYPE_PENDULUM
)
and
not
a
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
d
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
then
e
:
SetLabelObject
(
a
)
...
...
script/c35638627.lua
View file @
6b5f82a9
...
...
@@ -41,7 +41,7 @@ end
function
c35638627
.
atcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
c
:
IsChainAttackable
()
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
c
:
IsChainAttackable
()
and
c
:
IsStatus
(
STATUS_OPPO_BATTLE
)
end
function
c35638627
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
script/c35884610.lua
View file @
6b5f82a9
...
...
@@ -105,13 +105,6 @@ function c35884610.atop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_BATTLE
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e2
:
SetLabelObject
(
e1
)
e2
:
SetOperation
(
aux
.
atrst
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_BATTLE
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
function
c35884610
.
rmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
...
...
script/c46427957.lua
View file @
6b5f82a9
...
...
@@ -13,7 +13,7 @@ end
function
c46427957
.
atcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
c
:
IsChainAttackable
()
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
c
:
IsChainAttackable
()
and
c
:
IsStatus
(
STATUS_OPPO_BATTLE
)
end
function
c46427957
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
script/c49202331.lua
View file @
6b5f82a9
...
...
@@ -10,7 +10,7 @@ function c49202331.initial_effect(c)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e1
:
SetCondition
(
c49202331
.
dam
con
)
e1
:
SetCondition
(
aux
.
bdg
con
)
e1
:
SetTarget
(
c49202331
.
damtg
)
e1
:
SetOperation
(
c49202331
.
damop
)
c
:
RegisterEffect
(
e1
)
...
...
@@ -19,16 +19,12 @@ function c49202331.initial_effect(c)
e2
:
SetDescription
(
aux
.
Stringid
(
49202331
,
1
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_BATTLED
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c49202331
.
atcon
)
e2
:
SetCost
(
c49202331
.
atcost
)
e2
:
SetOperation
(
c49202331
.
atop
)
c
:
RegisterEffect
(
e2
)
end
function
c49202331
.
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
c49202331
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
bc
=
e
:
GetHandler
():
GetBattleTarget
()
...
...
script/c57274196.lua
View file @
6b5f82a9
...
...
@@ -11,7 +11,7 @@ function c57274196.initial_effect(c)
end
function
c57274196
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
return
tc
:
IsControler
(
tp
)
and
tc
:
IsRace
(
RACE_SPELLCASTER
)
and
tc
:
IsChainAttackable
()
return
tc
:
IsControler
(
tp
)
and
tc
:
IsRace
(
RACE_SPELLCASTER
)
and
tc
:
IsChainAttackable
()
and
tc
:
IsStatus
(
STATUS_OPPO_BATTLE
)
end
function
c57274196
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetActivityCount
(
tp
,
ACTIVITY_SUMMON
)
==
0
...
...
script/c58272005.lua
View file @
6b5f82a9
...
...
@@ -66,7 +66,7 @@ function c58272005.atcon(e,tp,eg,ep,ev,re,r,rp)
local
ec
=
e
:
GetHandler
():
GetEquipTarget
()
if
not
eg
:
IsContains
(
ec
)
then
return
false
end
local
bc
=
ec
:
GetBattleTarget
()
return
bc
:
Is
Reason
(
REASON_BATTLE
)
and
bc
:
IsLocation
(
LOCATION_GRAVE
)
and
ec
:
IsChainAttackable
(
2
,
true
)
return
bc
:
Is
Location
(
LOCATION_GRAVE
)
and
bc
:
IsType
(
TYPE_MONSTER
)
and
ec
:
IsChainAttackable
(
2
,
true
)
and
ec
:
IsStatus
(
STATUS_OPPO_BATTLE
)
end
function
c58272005
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
script/c6330307.lua
View file @
6b5f82a9
...
...
@@ -17,7 +17,7 @@ function c6330307.initial_effect(c)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e2
:
SetValue
(
1
)
c
:
RegisterEffect
(
e2
)
--
--
chain attack
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
6330307
,
1
))
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
...
...
@@ -64,13 +64,51 @@ function c6330307.atkcon(e,tp,eg,ep,ev,re,r,rp)
end
function
c6330307
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
at
=
Duel
.
GetAttackTarget
()
if
at
:
IsRelateToBattle
()
and
not
at
:
IsImmuneToEffect
(
e
)
then
local
c
=
e
:
GetHandler
()
local
ec
=
c
:
GetEquipTarget
()
if
at
:
IsRelateToBattle
()
and
not
at
:
IsImmuneToEffect
(
e
)
and
at
:
GetAttack
()
>
0
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetValue
(
0
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
at
:
RegisterEffect
(
e1
)
Duel
.
ChainAttack
(
at
)
--Duel.ChainAttack(at)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e2
:
SetValue
(
1
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_BATTLE
)
ec
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_CANNOT_DIRECT_ATTACK
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_BATTLE
)
ec
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_CANNOT_BE_BATTLE_TARGET
)
e4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e4
:
SetLabelObject
(
at
)
e4
:
SetTarget
(
c6330307
.
exttg
)
e4
:
SetValue
(
c6330307
.
extval
)
e4
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_BATTLE
)
ec
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e5
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e5
:
SetLabelObject
(
e2
)
e5
:
SetOperation
(
aux
.
atrst
)
e5
:
SetReset
(
RESET_PHASE
+
PHASE_BATTLE
)
Duel
.
RegisterEffect
(
e5
,
tp
)
end
end
function
c6330307
.
exttg
(
e
,
c
)
local
tc
=
e
:
GetLabelObject
()
return
c
~=
tc
end
function
c6330307
.
extval
(
e
,
c
)
return
c
==
e
:
GetHandler
()
end
script/c65260293.lua
View file @
6b5f82a9
...
...
@@ -26,7 +26,7 @@ end
function
c65260293
.
atcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
c
:
IsChainAttackable
()
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
c
:
IsChainAttackable
()
and
c
:
IsStatus
(
STATUS_OPPO_BATTLE
)
and
not
c
:
IsDisabled
()
and
Duel
.
IsExistingMatchingCard
(
c65260293
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
ATTRIBUTE_WIND
)
end
function
c65260293
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c65676461.lua
View file @
6b5f82a9
...
...
@@ -20,8 +20,8 @@ c65676461.xyz_number=32
function
c65676461
.
atcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
c
==
Duel
.
GetAttacker
()
and
c
:
Is
ChainAttackable
()
and
bc
:
IsLocation
(
LOCATION_GRAVE
)
and
bc
:
Is
Reason
(
REASON_BATTLE
)
return
c
==
Duel
.
GetAttacker
()
and
c
:
Is
RelateToBattle
()
and
c
:
IsStatus
(
STATUS_OPPO_BATTLE
)
and
bc
:
IsLocation
(
LOCATION_GRAVE
)
and
bc
:
Is
Type
(
TYPE_MONSTER
)
end
function
c65676461
.
atcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
...
...
script/c69069911.lua
View file @
6b5f82a9
...
...
@@ -8,6 +8,7 @@ function c69069911.initial_effect(c)
e1
:
SetDescription
(
aux
.
Stringid
(
69069911
,
0
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
c69069911
.
atcon
)
e1
:
SetCost
(
c69069911
.
atcost
)
e1
:
SetOperation
(
c69069911
.
atop
)
...
...
@@ -16,8 +17,7 @@ end
function
c69069911
.
atcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
bc
:
IsLocation
(
LOCATION_GRAVE
)
and
bc
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsChainAttackable
()
and
not
c
:
IsHasEffect
(
EFFECT_EXTRA_ATTACK
)
and
not
c
:
IsStatus
(
STATUS_SELF_BATTLE
)
return
bc
:
IsLocation
(
LOCATION_GRAVE
)
and
bc
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsChainAttackable
()
and
c
:
IsStatus
(
STATUS_OPPO_BATTLE
)
end
function
c69069911
.
atcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
...
...
script/c72989439.lua
View file @
6b5f82a9
...
...
@@ -78,7 +78,7 @@ function c72989439.atcon(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
c
:
GetFlagEffect
(
72989439
)
==
0
and
c
:
IsChainAttackable
()
and
not
c
:
IsHasEffect
(
EFFECT_EXTRA_ATTACK
)
and
not
c
:
IsStatus
(
STATUS_SELF_BATTLE
)
and
c
:
IsChainAttackable
()
and
c
:
IsStatus
(
STATUS_OPPO_BATTLE
)
end
function
c72989439
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
script/c75292259.lua
View file @
6b5f82a9
...
...
@@ -15,7 +15,47 @@ function c75292259.atcon(e,tp,eg,ep,ev,re,r,rp)
and
bc
:
GetBattlePosition
()
==
POS_FACEUP_ATTACK
and
c
:
IsChainAttackable
(
3
)
end
function
c75292259
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
75292259
,
0
))
then
Duel
.
ChainAttack
(
e
:
GetHandler
():
GetBattleTarget
())
--Duel.ChainAttack(e:GetHandler():GetBattleTarget())
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_BATTLE
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_CANNOT_DIRECT_ATTACK
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_BATTLE
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_BATTLE_TARGET
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e3
:
SetLabelObject
(
bc
)
e3
:
SetTarget
(
c75292259
.
exttg
)
e3
:
SetValue
(
c75292259
.
extval
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_BATTLE
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e4
:
SetLabelObject
(
e1
)
e4
:
SetOperation
(
aux
.
atrst
)
e4
:
SetReset
(
RESET_PHASE
+
PHASE_BATTLE
)
Duel
.
RegisterEffect
(
e4
,
tp
)
end
end
function
c75292259
.
exttg
(
e
,
c
)
local
tc
=
e
:
GetLabelObject
()
return
c
~=
tc
end
function
c75292259
.
extval
(
e
,
c
)
return
c
==
e
:
GetHandler
()
end
script/c80367387.lua
View file @
6b5f82a9
...
...
@@ -58,7 +58,7 @@ end
function
c80367387
.
atcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
c
:
IsChainAttackable
()
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
c
:
IsChainAttackable
()
and
c
:
IsStatus
(
STATUS_OPPO_BATTLE
)
end
function
c80367387
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
script/c86137485.lua
View file @
6b5f82a9
...
...
@@ -21,9 +21,9 @@ function c86137485.initial_effect(c)
end
function
c86137485
.
atcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
t
c
=
c
:
GetBattleTarget
()
return
Duel
.
GetTurnPlayer
()
==
tp
and
tc
:
IsLocation
(
LOCATION_GRAVE
)
and
tc
:
IsReason
(
REASON_BATTLE
)
and
tc
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsChainAttackable
(
)
local
b
c
=
c
:
GetBattleTarget
()
return
Duel
.
GetTurnPlayer
()
==
tp
and
bc
:
IsLocation
(
LOCATION_GRAVE
)
and
bc
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsChainAttackable
()
and
c
:
IsStatus
(
STATUS_OPPO_BATTLE
)
end
function
c86137485
.
atop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
@@ -34,11 +34,26 @@ function c86137485.atop1(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetValue
(
800
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
Duel
.
ChainAttack
()
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e2
:
SetValue
(
1
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_BATTLE
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e3
:
SetLabelObject
(
e2
)
e3
:
SetOperation
(
aux
.
atrst
)
e3
:
SetReset
(
RESET_PHASE
+
PHASE_BATTLE
)
Duel
.
RegisterEffect
(
e3
,
tp
)
end
function
c86137485
.
atcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetHandler
():
GetBattleTarget
()
return
Duel
.
GetTurnPlayer
()
~=
tp
and
tc
:
IsLocation
(
LOCATION_GRAVE
)
and
tc
:
IsReason
(
REASON_BATTLE
)
and
tc
:
IsType
(
TYPE_MONSTER
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
Duel
.
GetTurnPlayer
()
~=
tp
and
c
:
IsRelateToBattle
()
and
c
:
IsStatus
(
STATUS_OPPO_BATTLE
)
and
bc
:
IsLocation
(
LOCATION_GRAVE
)
and
bc
:
IsType
(
TYPE_MONSTER
)
end
function
c86137485
.
atop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
script/c88301393.lua
View file @
6b5f82a9
...
...
@@ -93,8 +93,7 @@ end
function
c88301393
.
atcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
bc
:
IsLocation
(
LOCATION_GRAVE
)
and
bc
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsChainAttackable
()
and
not
c
:
IsHasEffect
(
EFFECT_EXTRA_ATTACK
)
and
not
c
:
IsStatus
(
STATUS_SELF_BATTLE
)
return
bc
:
IsLocation
(
LOCATION_GRAVE
)
and
bc
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsChainAttackable
()
and
c
:
IsStatus
(
STATUS_OPPO_BATTLE
)
end
function
c88301393
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
script/constant.lua
View file @
6b5f82a9
...
...
@@ -148,7 +148,7 @@ STATUS_JUST_POS =0x1000000 --
STATUS_CONTINUOUS_POS
=
0x2000000
--连续变更表示形式?
STATUS_IS_PUBLIC
=
0x4000000
--公开展示
STATUS_ACT_FROM_HAND
=
0x8000000
--在手牌发动
STATUS_
SELF_BATTLE
=
0x10000000
--和自己
的怪兽戰鬥
STATUS_
OPPO_BATTLE
=
0x10000000
--和對手
的怪兽戰鬥
--Assume
ASSUME_CODE
=
1
ASSUME_TYPE
=
2
...
...
script/utility.lua
View file @
6b5f82a9
...
...
@@ -960,7 +960,7 @@ 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
)
return
c
:
IsRelateToBattle
()
and
c
:
IsStatus
(
STATUS_OPPO
_BATTLE
)
end
function
Auxiliary
.
bdgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
--condition of EVENT_BATTLE_DESTROYING + to_grave
...
...
@@ -972,5 +972,5 @@ 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
)
return
c
:
IsRelateToBattle
()
and
c
:
IsStatus
(
STATUS_OPPO
_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