Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
W
windbot
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
HiiragiGuardians
windbot
Commits
0e228ca1
Commit
0e228ca1
authored
Sep 04, 2016
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update card.attacked
parent
2e7936cf
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
2 deletions
+34
-2
Game/AI/Decks/DragunityExecutor.cs
Game/AI/Decks/DragunityExecutor.cs
+26
-2
Game/ClientCard.cs
Game/ClientCard.cs
+1
-0
Game/GameBehavior.cs
Game/GameBehavior.cs
+7
-0
No files found.
Game/AI/Decks/DragunityExecutor.cs
View file @
0e228ca1
using
YGOSharp.OCGWrapper.Enums
;
using
System.Collections.Generic
;
using
WindBot
;
using
WindBot.Game
;
using
WindBot.Game.AI
;
...
...
@@ -58,7 +59,7 @@ namespace DevBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
CrystalWingSynchroDragon
,
CrystalWingSynchroDragonEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
DragunityPhalanx
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
DragunityKnightVajrayana
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
DragunityArmaMysletainn
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
DragunityArmaMysletainn
,
DragunityArmaMysletainnEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
DragunityDux
);
// Summon
...
...
@@ -98,7 +99,7 @@ namespace DevBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
StarlightRoad
,
DefaultTrap
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
MirrorForce
,
DefaultTrap
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
DimensionalPrison
,
DefaultTrap
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
AssaultModeActivate
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
AssaultModeActivate
,
AssaultModeActivate
);
AddExecutor
(
ExecutorType
.
Repos
,
DefaultMonsterRepos
);
}
...
...
@@ -432,6 +433,12 @@ namespace DevBot.Game.AI.Decks
return
false
;
}
private
bool
DragunityArmaMysletainnEffect
()
{
AI
.
SelectCard
((
int
)
CardId
.
DragunityPhalanx
);
return
true
;
}
private
bool
DragunityArmaMysletainnTribute
()
{
if
((
Duel
.
Fields
[
0
].
HasInMonstersZone
((
int
)
CardId
.
AssaultBeast
)
...
...
@@ -468,6 +475,23 @@ namespace DevBot.Game.AI.Decks
return
LastChainPlayer
==
1
;
}
private
bool
AssaultModeActivate
()
{
if
(
Duel
.
Player
==
0
&&
Duel
.
Phase
==
DuelPhase
.
BattleStart
)
{
List
<
ClientCard
>
monsters
=
Duel
.
Fields
[
0
].
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
{
if
(
monster
.
Id
==
(
int
)
CardId
.
StardustDragon
&&
monster
.
Attacked
)
{
AI
.
SelectCard
(
monster
);
return
true
;
}
}
}
return
Duel
.
Player
==
1
;
}
private
ClientCard
GetProblematicCard
()
{
ClientCard
card
=
Duel
.
Fields
[
1
].
MonsterZone
.
GetInvincibleMonster
();
...
...
Game/ClientCard.cs
View file @
0e228ca1
...
...
@@ -32,6 +32,7 @@ namespace WindBot.Game
public
int
SelectSeq
{
get
;
set
;
}
public
bool
CanDirectAttack
{
get
;
set
;
}
public
bool
ShouldDirectAttack
{
get
;
set
;
}
public
bool
Attacked
{
get
;
set
;
}
public
int
[]
ActionIndex
{
get
;
set
;
}
public
IDictionary
<
int
,
int
>
ActionActivateIndex
{
get
;
private
set
;
}
...
...
Game/GameBehavior.cs
View file @
0e228ca1
...
...
@@ -542,8 +542,15 @@ namespace WindBot.Game
else
card
.
CanDirectAttack
=
false
;
battle
.
AttackableCards
.
Add
(
card
);
card
.
Attacked
=
false
;
}
}
List
<
ClientCard
>
monsters
=
_duel
.
Fields
[
0
].
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
{
if
(!
battle
.
AttackableCards
.
Contains
(
monster
))
monster
.
Attacked
=
true
;
}
battle
.
CanMainPhaseTwo
=
packet
.
ReadByte
()
!=
0
;
battle
.
CanEndPhase
=
packet
.
ReadByte
()
!=
0
;
...
...
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