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
alstroemeria-silentlove
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 @@
...
@@ -7,7 +7,7 @@
"我的超主流卡组需要{0}才能玩。"
"我的超主流卡组需要{0}才能玩。"
],
],
"duelstart"
:
[
"duelstart"
:
[
"
闪刀姬
卡组测试中,渣操是正常情况,请多指教。"
,
"
自奏圣乐
卡组测试中,渣操是正常情况,请多指教。"
,
"超主流是游戏王的一环,不爽不要玩。"
,
"超主流是游戏王的一环,不爽不要玩。"
,
"抄主流是游戏王的一环,不爽不要玩。"
,
"抄主流是游戏王的一环,不爽不要玩。"
,
"抄来的卡组不会用,怎么办?"
"抄来的卡组不会用,怎么办?"
...
@@ -59,6 +59,7 @@
...
@@ -59,6 +59,7 @@
"出来吧,{0}!"
,
"出来吧,{0}!"
,
"出现吧,{0}!"
,
"出现吧,{0}!"
,
"我召唤了美丽的{0}!"
,
"我召唤了美丽的{0}!"
,
"我召唤了强大的{0}!"
,
"我呼唤{0}参加战斗!"
,
"我呼唤{0}参加战斗!"
,
"我呼唤出{0}。"
,
"我呼唤出{0}。"
,
"让我召唤{0}。"
"让我召唤{0}。"
...
...
Game/AI/Decks/OrcustExecutor.cs
View file @
60252a31
...
@@ -103,9 +103,9 @@ namespace WindBot.Game.AI.Decks
...
@@ -103,9 +103,9 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
TrickstarCandina
,
CandinaSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
TrickstarCandina
,
CandinaSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
TrickstarCandina
,
CandinaEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
TrickstarCandina
,
CandinaEffect
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
JetSynchron
,
O
ther
Summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
JetSynchron
,
O
neCardCombo
Summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
ThePhantomKnightsofAncientCloak
,
O
ther
Summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
ThePhantomKnightsofAncientCloak
,
O
neCardCombo
Summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
ThePhantomKnightsofSilentBoots
,
O
ther
Summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
ThePhantomKnightsofSilentBoots
,
O
neCardCombo
Summon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
SalamangreatAlmiraj
,
AlmirajSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
SalamangreatAlmiraj
,
AlmirajSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
ThePhantomKnightsofShadeBrigandine
,
ShadeBrigandineSummonFirst
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
ThePhantomKnightsofShadeBrigandine
,
ShadeBrigandineSummonFirst
);
...
@@ -147,11 +147,13 @@ namespace WindBot.Game.AI.Decks
...
@@ -147,11 +147,13 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
ThePhantomKnightsofSilentBoots
,
SilentBootsEffect
);
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
.
OrcustCymbalSkeleton
,
OtherSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
GhostBelleHauntedMansion
,
OtherSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
OrcustHarpHorror
,
OtherSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
AshBlossomJoyousSpring
,
OtherSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
ThePhantomKnightsofAncientCloak
,
LinkMaterialSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
MaxxC
,
OtherSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
MaxxC
,
LinkMaterialSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
ThePhantomKnightsofSilentBoots
,
LinkMaterialSummon
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
PhantomKnightsFogBlade
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
PhantomKnightsFogBlade
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
PhantomKnightsFogBlade
,
FogBladeEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
PhantomKnightsFogBlade
,
FogBladeEffect
);
...
@@ -162,7 +164,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -162,7 +164,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
SkyStrikerMechaEagleBooster
,
EagleBoosterEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
SkyStrikerMechaEagleBooster
,
EagleBoosterEffect
);
AddExecutor
(
ExecutorType
.
Repos
,
Default
MonsterRepos
);
AddExecutor
(
ExecutorType
.
Repos
,
MonsterRepos
);
}
}
private
bool
NormalSummoned
=
false
;
private
bool
NormalSummoned
=
false
;
...
@@ -190,6 +192,12 @@ namespace WindBot.Game.AI.Decks
...
@@ -190,6 +192,12 @@ namespace WindBot.Game.AI.Decks
CardId
.
GhostBelleHauntedMansion
CardId
.
GhostBelleHauntedMansion
};
};
public
override
bool
OnSelectHand
()
{
// go first
return
true
;
}
public
override
void
OnNewTurn
()
public
override
void
OnNewTurn
()
{
{
NormalSummoned
=
false
;
NormalSummoned
=
false
;
...
@@ -200,6 +208,11 @@ namespace WindBot.Game.AI.Decks
...
@@ -200,6 +208,11 @@ namespace WindBot.Game.AI.Decks
LightStageTarget
=
null
;
LightStageTarget
=
null
;
}
}
public
override
void
OnChainEnd
()
{
RustyBardicheTarget
=
null
;
}
public
override
CardPosition
OnSelectPosition
(
int
cardId
,
IList
<
CardPosition
>
positions
)
public
override
CardPosition
OnSelectPosition
(
int
cardId
,
IList
<
CardPosition
>
positions
)
{
{
YGOSharp
.
OCGWrapper
.
NamedCard
cardData
=
YGOSharp
.
OCGWrapper
.
NamedCard
.
Get
(
cardId
);
YGOSharp
.
OCGWrapper
.
NamedCard
cardData
=
YGOSharp
.
OCGWrapper
.
NamedCard
.
Get
(
cardId
);
...
@@ -361,7 +374,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -361,7 +374,7 @@ namespace WindBot.Game.AI.Decks
private
bool
DronesEffect
()
private
bool
DronesEffect
()
{
{
return
!
Bot
.
HasInHand
(
CardId
.
ArmageddonKnight
);
return
!
Bot
.
HasInHand
(
CardId
.
ArmageddonKnight
)
&&
!
Bot
.
HasInHand
(
CardId
.
TrickstarCandina
)
;
}
}
private
bool
CandinaSummon
()
private
bool
CandinaSummon
()
...
@@ -441,7 +454,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -441,7 +454,7 @@ namespace WindBot.Game.AI.Decks
private
bool
DestrudoSummon
()
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
()
private
bool
NeedlefiberSummonFirst
()
...
@@ -581,7 +594,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -581,7 +594,7 @@ namespace WindBot.Game.AI.Decks
{
{
if
(!
Bot
.
HasInGraveyard
(
CardId
.
OrcustHarpHorror
))
if
(!
Bot
.
HasInGraveyard
(
CardId
.
OrcustHarpHorror
))
{
{
AI
.
SelectCard
(
CardId
.
GalateaTheOrcustAutomaton
);
AI
.
SelectCard
(
Util
.
GetBestBotMonster
()
);
AI
.
SelectNextCard
(
CardId
.
OrcustHarpHorror
);
AI
.
SelectNextCard
(
CardId
.
OrcustHarpHorror
);
return
true
;
return
true
;
}
}
...
@@ -632,7 +645,9 @@ namespace WindBot.Game.AI.Decks
...
@@ -632,7 +645,9 @@ namespace WindBot.Game.AI.Decks
{
{
if
(
ActivateDescription
==
-
1
||
ActivateDescription
==
Util
.
GetStringId
(
CardId
.
ThePhantomKnightsofRustyBardiche
,
0
))
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
)
if
(
target
==
null
)
return
false
;
return
false
;
RustyBardicheTarget
=
target
;
RustyBardicheTarget
=
target
;
...
@@ -650,11 +665,16 @@ namespace WindBot.Game.AI.Decks
...
@@ -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
()
private
bool
CymbalSkeletonEffect
()
{
{
int
[]
botTurnTargets
=
new
[]
{
CardId
.
GalateaTheOrcustAutomaton
,
CardId
.
SheorcustDingirsu
};
int
[]
botTurnTargets
=
new
[]
{
CardId
.
GalateaTheOrcustAutomaton
,
CardId
.
SheorcustDingirsu
};
int
[]
emenyTurnTargets
=
new
[]
{
CardId
.
SheorcustDingirsu
,
CardId
.
GalateaTheOrcustAutomaton
};
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
);
AI
.
SelectCard
(
botTurnTargets
);
CymbalSkeletonUsed
=
true
;
CymbalSkeletonUsed
=
true
;
...
@@ -686,7 +706,19 @@ namespace WindBot.Game.AI.Decks
...
@@ -686,7 +706,19 @@ namespace WindBot.Game.AI.Decks
private
bool
SheorcustDingirsuEffect
()
private
bool
SheorcustDingirsuEffect
()
{
{
if
(
ActivateDescription
==
96
)
{
// TODO: FogBlade lost target
return
true
;
}
ClientCard
target
;
ClientCard
target
;
target
=
GetFogBladeTarget
();
if
(
target
!=
null
&&
target
!=
RustyBardicheTarget
)
{
AI
.
SelectOption
(
0
);
AI
.
SelectCard
(
target
);
return
true
;
}
target
=
Util
.
GetProblematicEnemyMonster
();
target
=
Util
.
GetProblematicEnemyMonster
();
if
(
target
!=
null
&&
target
!=
RustyBardicheTarget
)
if
(
target
!=
null
&&
target
!=
RustyBardicheTarget
)
{
{
...
@@ -701,8 +733,21 @@ namespace WindBot.Game.AI.Decks
...
@@ -701,8 +733,21 @@ namespace WindBot.Game.AI.Decks
AI
.
SelectCard
(
target
);
AI
.
SelectCard
(
target
);
return
true
;
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
.
SelectOption
(
1
);
AI
.
SelectCard
(
CardId
.
OrcustCymbalSkeleton
);
//AI.SelectCard(); any card
return
true
;
return
true
;
}
}
...
@@ -731,6 +776,8 @@ namespace WindBot.Game.AI.Decks
...
@@ -731,6 +776,8 @@ namespace WindBot.Game.AI.Decks
private
bool
ShadeBrigandineSummonSecond
()
private
bool
ShadeBrigandineSummonSecond
()
{
{
if
(
DefaultOnBecomeTarget
())
return
true
;
return
(
Bot
.
HasInMonstersZone
(
CardId
.
SalamangreatAlmiraj
)
&&
Bot
.
HasInExtra
(
CardId
.
KnightmarePhoenix
))
||
return
(
Bot
.
HasInMonstersZone
(
CardId
.
SalamangreatAlmiraj
)
&&
Bot
.
HasInExtra
(
CardId
.
KnightmarePhoenix
))
||
(
Bot
.
HasInMonstersZone
(
CardId
.
JetSynchron
)
&&
Bot
.
HasInMonstersZone
(
CardId
.
ThePhantomKnightsofSilentBoots
));
(
Bot
.
HasInMonstersZone
(
CardId
.
JetSynchron
)
&&
Bot
.
HasInMonstersZone
(
CardId
.
ThePhantomKnightsofSilentBoots
));
}
}
...
@@ -755,6 +802,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -755,6 +802,7 @@ namespace WindBot.Game.AI.Decks
CardId
.
OrcustHarpHorror
,
CardId
.
OrcustHarpHorror
,
CardId
.
CrystronNeedlefiber
,
CardId
.
CrystronNeedlefiber
,
CardId
.
SkyStrikerAceKagari
,
CardId
.
SkyStrikerAceKagari
,
CardId
.
KnightmareMermaid
,
CardId
.
ArmageddonKnight
CardId
.
ArmageddonKnight
});
});
return
true
;
return
true
;
...
@@ -805,6 +853,36 @@ namespace WindBot.Game.AI.Decks
...
@@ -805,6 +853,36 @@ namespace WindBot.Game.AI.Decks
return
Bot
.
GetMonsterCount
()
<
2
;
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
()
private
bool
OtherSummon
()
{
{
NormalSummoned
=
true
;
NormalSummoned
=
true
;
...
@@ -861,5 +939,12 @@ namespace WindBot.Game.AI.Decks
...
@@ -861,5 +939,12 @@ namespace WindBot.Game.AI.Decks
}
}
return
false
;
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
...
@@ -59,6 +59,8 @@ namespace WindBot.Game.AI
public
const
int
GhostOgreAndSnowRabbit
=
59438930
;
public
const
int
GhostOgreAndSnowRabbit
=
59438930
;
public
const
int
GhostBelle
=
73642296
;
public
const
int
GhostBelle
=
73642296
;
public
const
int
EffectVeiler
=
63845230
;
public
const
int
EffectVeiler
=
63845230
;
public
const
int
ArtifactLancea
=
34267821
;
public
const
int
CalledByTheGrave
=
24224830
;
public
const
int
CalledByTheGrave
=
24224830
;
public
const
int
InfiniteImpermanence
=
10045474
;
public
const
int
InfiniteImpermanence
=
10045474
;
public
const
int
GalaxySoldier
=
46659709
;
public
const
int
GalaxySoldier
=
46659709
;
...
@@ -439,7 +441,9 @@ namespace WindBot.Game.AI
...
@@ -439,7 +441,9 @@ namespace WindBot.Game.AI
_CardId
.
LockBird
,
_CardId
.
LockBird
,
_CardId
.
GhostOgreAndSnowRabbit
,
_CardId
.
GhostOgreAndSnowRabbit
,
_CardId
.
AshBlossom
,
_CardId
.
AshBlossom
,
_CardId
.
GhostBelle
_CardId
.
GhostBelle
,
_CardId
.
EffectVeiler
,
_CardId
.
ArtifactLancea
};
};
if
(
Duel
.
LastChainPlayer
==
1
)
if
(
Duel
.
LastChainPlayer
==
1
)
{
{
...
...
Game/GameAI.cs
View file @
60252a31
...
@@ -371,7 +371,7 @@ namespace WindBot.Game
...
@@ -371,7 +371,7 @@ namespace WindBot.Game
{
{
foreach
(
CardExecutor
exec
in
Executor
.
Executors
)
foreach
(
CardExecutor
exec
in
Executor
.
Executors
)
{
{
if
(
ShouldExecute
(
exec
,
card
,
ExecutorType
.
Activate
))
if
(
ShouldExecute
(
exec
,
card
,
ExecutorType
.
Activate
,
desc
))
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
...
Game/GameBehavior.cs
View file @
60252a31
...
@@ -1115,6 +1115,14 @@ namespace WindBot.Game
...
@@ -1115,6 +1115,14 @@ namespace WindBot.Game
packet
.
ReadByte
();
packet
.
ReadByte
();
int
desc
=
packet
.
ReadInt32
();
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
);
ClientCard
card
=
_duel
.
GetCard
(
player
,
loc
,
seq
);
if
(
card
==
null
)
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