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
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
windbot
Commits
64526e23
Commit
64526e23
authored
Sep 23, 2024
by
wind2009
Committed by
GitHub
Sep 23, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add OnSpSummoned (#202)
parent
b0a420e2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
2 deletions
+37
-2
Game/AI/Decks/BlueEyesExecutor.cs
Game/AI/Decks/BlueEyesExecutor.cs
+16
-1
Game/AI/Executor.cs
Game/AI/Executor.cs
+10
-0
Game/GameAI.cs
Game/GameAI.cs
+9
-0
Game/GameBehavior.cs
Game/GameBehavior.cs
+2
-1
No files found.
Game/AI/Decks/BlueEyesExecutor.cs
View file @
64526e23
...
@@ -177,6 +177,22 @@ namespace WindBot.Game.AI.Decks
...
@@ -177,6 +177,22 @@ namespace WindBot.Game.AI.Decks
return
null
;
return
null
;
}
}
public
override
void
OnSpSummoned
()
{
// not special summoned by chain
if
(
Duel
.
GetCurrentSolvingChainCard
()
==
null
)
{
foreach
(
ClientCard
card
in
Duel
.
LastSummonedCards
)
{
if
(
card
.
Controller
==
0
&&
card
.
IsCode
(
CardId
.
AlternativeWhiteDragon
))
{
AlternativeWhiteDragonSummoned
=
true
;
}
}
}
base
.
OnSpSummoned
();
}
private
bool
DragonShrineEffect
()
private
bool
DragonShrineEffect
()
{
{
AI
.
SelectCard
(
AI
.
SelectCard
(
...
@@ -501,7 +517,6 @@ namespace WindBot.Game.AI.Decks
...
@@ -501,7 +517,6 @@ namespace WindBot.Game.AI.Decks
private
bool
AlternativeWhiteDragonSummon
()
private
bool
AlternativeWhiteDragonSummon
()
{
{
AlternativeWhiteDragonSummoned
=
true
;
return
true
;
return
true
;
}
}
...
...
Game/AI/Executor.cs
View file @
64526e23
...
@@ -237,6 +237,16 @@ namespace WindBot.Game.AI
...
@@ -237,6 +237,16 @@ namespace WindBot.Game.AI
return
0
;
return
0
;
}
}
/// <summary>
/// Called when card is successfully special summoned.
/// Used on monsters that can only special summoned once per turn.
/// </summary>
public
virtual
void
OnSpSummoned
()
{
// For overriding
return
;
}
public
void
SetMain
(
MainPhase
main
)
public
void
SetMain
(
MainPhase
main
)
{
{
Main
=
main
;
Main
=
main
;
...
...
Game/GameAI.cs
View file @
64526e23
...
@@ -164,6 +164,15 @@ namespace WindBot.Game
...
@@ -164,6 +164,15 @@ namespace WindBot.Game
{
{
Executor
.
OnChainSolved
(
chainIndex
);
Executor
.
OnChainSolved
(
chainIndex
);
}
}
/// <summary>
/// Called when card is successfully special summoned.
/// Used on monsters that can only special summoned once per turn.
/// </summary>
public
void
OnSpSummoned
()
{
Executor
.
OnSpSummoned
();
}
/// <summary>
/// <summary>
/// Called when a chain has been solved.
/// Called when a chain has been solved.
...
...
Game/GameBehavior.cs
View file @
64526e23
...
@@ -27,7 +27,7 @@ namespace WindBot.Game
...
@@ -27,7 +27,7 @@ namespace WindBot.Game
private
Room
_room
;
private
Room
_room
;
private
Duel
_duel
;
private
Duel
_duel
;
private
int
_hand
;
private
int
_hand
;
private
bool
_debug
;
private
bool
_debug
;
private
int
_select_hint
;
private
int
_select_hint
;
private
GameMessage
_lastMessage
;
private
GameMessage
_lastMessage
;
...
@@ -1971,6 +1971,7 @@ namespace WindBot.Game
...
@@ -1971,6 +1971,7 @@ namespace WindBot.Game
card
.
IsSpecialSummoned
=
true
;
card
.
IsSpecialSummoned
=
true
;
_duel
.
LastSummonedCards
.
Add
(
card
);
_duel
.
LastSummonedCards
.
Add
(
card
);
}
}
_ai
.
OnSpSummoned
();
_duel
.
SummoningCards
.
Clear
();
_duel
.
SummoningCards
.
Clear
();
}
}
...
...
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