Skip to content

Commit

Permalink
Add enemy crest
Browse files Browse the repository at this point in the history
  • Loading branch information
gbaman committed Jun 25, 2023
1 parent 1513aed commit 3b9dffc
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions cyber_kingdom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,15 +374,25 @@ let FirewallSetupStartingRule = new Rule(39, 64, -29, true, "-1")
//% grid.shadow="buildagrid"
export function requireCrest(grid: SymbolGrid,): Rule {
if (grid.gridText === `
. . . . .
# . . . #
. # . # .
. . # . .
. # # # .
. . . . .
# . # . #
`){
player.say("Royal crest added")
return blocks_rules[CrestSymbol.RoyalCrest.toString()];
}
else if (grid.gridText === `
. . # . .
. # . # .
# . # . #
. # . # .
# . . . #
`){
player.say("Enemy crest added")
return blocks_rules[CrestSymbol.EnemyCrest.toString()];
}
else{
player.say("Unknown crest")
return blocks_rules[CrestSymbol.UnknownCrest.toString()];
Expand Down

0 comments on commit 3b9dffc

Please sign in to comment.