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
nanahira
windbot
Commits
60252a31
Commit
60252a31
authored
Apr 27, 2019
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/IceYGO/windbot
parents
b60ace1a
6e96e522
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
115 additions
and
17 deletions
+115
-17
Dialogs/anothercopy.zh-CN.json
Dialogs/anothercopy.zh-CN.json
+2
-1
Game/AI/Decks/OrcustExecutor.cs
Game/AI/Decks/OrcustExecutor.cs
+99
-14
Game/AI/DefaultExecutor.cs
Game/AI/DefaultExecutor.cs
+5
-1
Game/GameAI.cs
Game/GameAI.cs
+1
-1
Game/GameBehavior.cs
Game/GameBehavior.cs
+8
-0
No files found.
Dialogs/anothercopy.zh-CN.json
View file @
60252a31
...
...
@@ -7,7 +7,7 @@
"我的超主流卡组需要{0}才能玩。"
],
"duelstart"
:
[
"
闪刀姬
卡组测试中,渣操是正常情况,请多指教。"
,
"
自奏圣乐
卡组测试中,渣操是正常情况,请多指教。"
,
"超主流是游戏王的一环,不爽不要玩。"
,
"抄主流是游戏王的一环,不爽不要玩。"
,
"抄来的卡组不会用,怎么办?"
...
...
@@ -59,6 +59,7 @@
"出来吧,{0}!"
,
"出现吧,{0}!"
,
"我召唤了美丽的{0}!"
,
"我召唤了强大的{0}!"
,
"我呼唤{0}参加战斗!"
,
"我呼唤出{0}。"
,
"让我召唤{0}。"
...
...
Game/AI/Decks/OrcustExecutor.cs
View file @
60252a31
...
...
@@ -103,9 +103,9 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
TrickstarCandina
,
CandinaSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
TrickstarCandina
,
CandinaEffect
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
JetSynchron
,
O
ther
Summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
ThePhantomKnightsofAncientCloak
,
O
ther
Summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
ThePhantomKnightsofSilentBoots
,
O
ther
Summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
JetSynchron
,
O
neCardCombo
Summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
ThePhantomKnightsofAncientCloak
,
O
neCardCombo
Summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
ThePhantomKnightsofSilentBoots
,
O
neCardCombo
Summon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
SalamangreatAlmiraj
,
AlmirajSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
ThePhantomKnightsofShadeBrigandine
,
ShadeBrigandineSummonFirst
);
...
...
@@ -147,11 +147,13 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
ThePhantomKnightsofSilentBoots
,
SilentBootsEffect
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
OrcustHarpHorror
,
OtherSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
GhostBelleHauntedMansion
,
TunerSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
AshBlossomJoyousSpring
,
TunerSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
OrcustCymbalSkeleton
,
OtherSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
GhostBelleHauntedMansion
,
OtherSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
AshBlossomJoyousSpring
,
OtherSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
MaxxC
,
OtherSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
OrcustHarpHorror
,
OtherSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
ThePhantomKnightsofAncientCloak
,
LinkMaterialSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
MaxxC
,
LinkMaterialSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
ThePhantomKnightsofSilentBoots
,
LinkMaterialSummon
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
PhantomKnightsFogBlade
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
PhantomKnightsFogBlade
,
FogBladeEffect
);
...
...
@@ -162,7 +164,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
SkyStrikerMechaEagleBooster
,
EagleBoosterEffect
);
AddExecutor
(
ExecutorType
.
Repos
,
Default
MonsterRepos
);
AddExecutor
(
ExecutorType
.
Repos
,
MonsterRepos
);
}
private
bool
NormalSummoned
=
false
;
...
...
@@ -190,6 +192,12 @@ namespace WindBot.Game.AI.Decks
CardId
.
GhostBelleHauntedMansion
};
public
override
bool
OnSelectHand
()
{
// go first
return
true
;
}
public
override
void
OnNewTurn
()
{
NormalSummoned
=
false
;
...
...
@@ -200,6 +208,11 @@ namespace WindBot.Game.AI.Decks
LightStageTarget
=
null
;
}
public
override
void
OnChainEnd
()
{
RustyBardicheTarget
=
null
;
}
public
override
CardPosition
OnSelectPosition
(
int
cardId
,
IList
<
CardPosition
>
positions
)
{
YGOSharp
.
OCGWrapper
.
NamedCard
cardData
=
YGOSharp
.
OCGWrapper
.
NamedCard
.
Get
(
cardId
);
...
...
@@ -361,7 +374,7 @@ namespace WindBot.Game.AI.Decks
private
bool
DronesEffect
()
{
return
!
Bot
.
HasInHand
(
CardId
.
ArmageddonKnight
);
return
!
Bot
.
HasInHand
(
CardId
.
ArmageddonKnight
)
&&
!
Bot
.
HasInHand
(
CardId
.
TrickstarCandina
)
;
}
private
bool
CandinaSummon
()
...
...
@@ -441,7 +454,7 @@ namespace WindBot.Game.AI.Decks
private
bool
DestrudoSummon
()
{
return
Bot
.
GetMonsterCount
()
>
0
&&
Bot
.
HasInExtra
(
new
[]
{
CardId
.
CrystronNeedlefiber
,
CardId
.
KnightmarePhoenix
});
return
Bot
.
GetMonsterCount
()
<
3
&&
Bot
.
HasInExtra
(
new
[]
{
CardId
.
CrystronNeedlefiber
,
CardId
.
KnightmarePhoenix
});
}
private
bool
NeedlefiberSummonFirst
()
...
...
@@ -581,7 +594,7 @@ namespace WindBot.Game.AI.Decks
{
if
(!
Bot
.
HasInGraveyard
(
CardId
.
OrcustHarpHorror
))
{
AI
.
SelectCard
(
CardId
.
GalateaTheOrcustAutomaton
);
AI
.
SelectCard
(
Util
.
GetBestBotMonster
()
);
AI
.
SelectNextCard
(
CardId
.
OrcustHarpHorror
);
return
true
;
}
...
...
@@ -632,7 +645,9 @@ namespace WindBot.Game.AI.Decks
{
if
(
ActivateDescription
==
-
1
||
ActivateDescription
==
Util
.
GetStringId
(
CardId
.
ThePhantomKnightsofRustyBardiche
,
0
))
{
ClientCard
target
=
Util
.
GetBestEnemyCard
(
false
,
true
);
ClientCard
target
=
GetFogBladeTarget
();
if
(
target
==
null
)
target
=
Util
.
GetBestEnemyCard
(
false
,
true
);
if
(
target
==
null
)
return
false
;
RustyBardicheTarget
=
target
;
...
...
@@ -650,11 +665,16 @@ namespace WindBot.Game.AI.Decks
}
}
private
ClientCard
GetFogBladeTarget
()
{
return
Enemy
.
MonsterZone
.
GetFirstMatchingCard
(
card
=>
card
.
OwnTargets
.
Any
(
cont
=>
cont
.
IsCode
(
CardId
.
PhantomKnightsFogBlade
)));
}
private
bool
CymbalSkeletonEffect
()
{
int
[]
botTurnTargets
=
new
[]
{
CardId
.
GalateaTheOrcustAutomaton
,
CardId
.
SheorcustDingirsu
};
int
[]
emenyTurnTargets
=
new
[]
{
CardId
.
SheorcustDingirsu
,
CardId
.
GalateaTheOrcustAutomaton
};
if
(
Duel
.
Player
==
0
&&
Bot
.
HasInGraveyard
(
CardId
.
GalateaTheOrcustAutomaton
)
&&
!
Bot
.
HasInMonstersZone
(
CardId
.
GalateaTheOrcustAutomaton
))
if
(
Duel
.
Player
==
0
&&
Bot
.
HasInGraveyard
(
CardId
.
GalateaTheOrcustAutomaton
)
&&
!
Bot
.
HasInMonstersZone
(
CardId
.
GalateaTheOrcustAutomaton
)
&&
Bot
.
HasInExtra
(
CardId
.
SheorcustDingirsu
)
&&
!
SheorcustDingirsuSummoned
)
{
AI
.
SelectCard
(
botTurnTargets
);
CymbalSkeletonUsed
=
true
;
...
...
@@ -686,7 +706,19 @@ namespace WindBot.Game.AI.Decks
private
bool
SheorcustDingirsuEffect
()
{
if
(
ActivateDescription
==
96
)
{
// TODO: FogBlade lost target
return
true
;
}
ClientCard
target
;
target
=
GetFogBladeTarget
();
if
(
target
!=
null
&&
target
!=
RustyBardicheTarget
)
{
AI
.
SelectOption
(
0
);
AI
.
SelectCard
(
target
);
return
true
;
}
target
=
Util
.
GetProblematicEnemyMonster
();
if
(
target
!=
null
&&
target
!=
RustyBardicheTarget
)
{
...
...
@@ -701,8 +733,21 @@ namespace WindBot.Game.AI.Decks
AI
.
SelectCard
(
target
);
return
true
;
}
if
(
Bot
.
HasInBanished
(
CardId
.
OrcustCymbalSkeleton
))
{
AI
.
SelectOption
(
1
);
AI
.
SelectCard
(
CardId
.
OrcustCymbalSkeleton
);
return
true
;
}
target
=
Enemy
.
MonsterZone
.
GetFirstMatchingCard
(
card
=>
card
!=
RustyBardicheTarget
)
??
Enemy
.
SpellZone
.
GetFirstMatchingCard
(
card
=>
card
!=
RustyBardicheTarget
);
if
(
target
!=
null
)
{
AI
.
SelectOption
(
0
);
AI
.
SelectCard
(
target
);
return
true
;
}
AI
.
SelectOption
(
1
);
AI
.
SelectCard
(
CardId
.
OrcustCymbalSkeleton
);
//AI.SelectCard(); any card
return
true
;
}
...
...
@@ -731,6 +776,8 @@ namespace WindBot.Game.AI.Decks
private
bool
ShadeBrigandineSummonSecond
()
{
if
(
DefaultOnBecomeTarget
())
return
true
;
return
(
Bot
.
HasInMonstersZone
(
CardId
.
SalamangreatAlmiraj
)
&&
Bot
.
HasInExtra
(
CardId
.
KnightmarePhoenix
))
||
(
Bot
.
HasInMonstersZone
(
CardId
.
JetSynchron
)
&&
Bot
.
HasInMonstersZone
(
CardId
.
ThePhantomKnightsofSilentBoots
));
}
...
...
@@ -755,6 +802,7 @@ namespace WindBot.Game.AI.Decks
CardId
.
OrcustHarpHorror
,
CardId
.
CrystronNeedlefiber
,
CardId
.
SkyStrikerAceKagari
,
CardId
.
KnightmareMermaid
,
CardId
.
ArmageddonKnight
});
return
true
;
...
...
@@ -805,6 +853,36 @@ namespace WindBot.Game.AI.Decks
return
Bot
.
GetMonsterCount
()
<
2
;
}
private
bool
OneCardComboSummon
()
{
if
(
Bot
.
HasInExtra
(
CardId
.
SalamangreatAlmiraj
)
&&
Bot
.
HasInExtra
(
new
[]
{
CardId
.
CrystronNeedlefiber
,
CardId
.
KnightmarePhoenix
}))
{
NormalSummoned
=
true
;
return
true
;
}
return
false
;
}
private
bool
LinkMaterialSummon
()
{
if
(
Bot
.
HasInExtra
(
CardId
.
KnightmarePhoenix
)
&&
Bot
.
GetMonsterCount
()
>
0
)
{
NormalSummoned
=
true
;
return
true
;
}
return
false
;
}
private
bool
TunerSummon
()
{
if
(
Bot
.
HasInExtra
(
new
[]
{
CardId
.
CrystronNeedlefiber
,
CardId
.
KnightmarePhoenix
})
&&
Bot
.
GetMonsterCount
()
>
0
)
{
NormalSummoned
=
true
;
return
true
;
}
return
false
;
}
private
bool
OtherSummon
()
{
NormalSummoned
=
true
;
...
...
@@ -861,5 +939,12 @@ namespace WindBot.Game.AI.Decks
}
return
false
;
}
private
bool
MonsterRepos
()
{
if
(
Card
.
IsFacedown
())
return
true
;
return
DefaultMonsterRepos
();
}
}
}
Game/AI/DefaultExecutor.cs
View file @
60252a31
...
...
@@ -59,6 +59,8 @@ namespace WindBot.Game.AI
public
const
int
GhostOgreAndSnowRabbit
=
59438930
;
public
const
int
GhostBelle
=
73642296
;
public
const
int
EffectVeiler
=
63845230
;
public
const
int
ArtifactLancea
=
34267821
;
public
const
int
CalledByTheGrave
=
24224830
;
public
const
int
InfiniteImpermanence
=
10045474
;
public
const
int
GalaxySoldier
=
46659709
;
...
...
@@ -439,7 +441,9 @@ namespace WindBot.Game.AI
_CardId
.
LockBird
,
_CardId
.
GhostOgreAndSnowRabbit
,
_CardId
.
AshBlossom
,
_CardId
.
GhostBelle
_CardId
.
GhostBelle
,
_CardId
.
EffectVeiler
,
_CardId
.
ArtifactLancea
};
if
(
Duel
.
LastChainPlayer
==
1
)
{
...
...
Game/GameAI.cs
View file @
60252a31
...
...
@@ -371,7 +371,7 @@ namespace WindBot.Game
{
foreach
(
CardExecutor
exec
in
Executor
.
Executors
)
{
if
(
ShouldExecute
(
exec
,
card
,
ExecutorType
.
Activate
))
if
(
ShouldExecute
(
exec
,
card
,
ExecutorType
.
Activate
,
desc
))
return
true
;
}
return
false
;
...
...
Game/GameBehavior.cs
View file @
60252a31
...
...
@@ -1115,6 +1115,14 @@ namespace WindBot.Game
packet
.
ReadByte
();
int
desc
=
packet
.
ReadInt32
();
if
(
desc
==
0
||
desc
==
221
)
{
// 0: phase trigger effect
// 221: trigger effect
// for compatibility
desc
=
-
1
;
}
ClientCard
card
=
_duel
.
GetCard
(
player
,
loc
,
seq
);
if
(
card
==
null
)
{
...
...
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