Added #map

This commit is contained in:
raeleus 2024-09-30 08:08:19 -07:00
parent 99b9206276
commit a27a107c83
4 changed files with 48 additions and 3 deletions

View file

@ -31,6 +31,7 @@ function rotate(cx, cy, x, y, angle) {
}
function createLocation(x, y, name) {
log(`createlocation ${name}:${x},${y}`)
if (x == null || y == null) {
var cx = x == null ? state.x : x
var cy = y == null ? state.y : y
@ -340,6 +341,10 @@ function findSpellCardIndex(name) {
return storyCards.findIndex((element) => element.type == "spell" && element.keys == name)
}
String.prototype.replaceAt = function(index, replacement) {
return this.substring(0, index) + replacement + this.substring(index + replacement.length);
}
String.prototype.plural = function(revert) {
var plural = {