mirror of
https://github.com/raeleus/Hashtag-DnD.git
synced 2025-07-06 05:30:28 -04:00
Fixed minor errors in drop.
This commit is contained in:
parent
3fa78a82f0
commit
47d96b643e
1 changed files with 2 additions and 2 deletions
4
Input.js
4
Input.js
|
@ -1187,7 +1187,7 @@ function doDrop(command) {
|
|||
var existingItem = character.inventory[index]
|
||||
|
||||
if (item.quantity == 1) text = `\n${character.name} ${commandName} the ${displayItemName}.\n`
|
||||
else if (item.quantity >= existingItem.quantity) text = `${character.name} ${commandName} all of the ${displayItemName}.`
|
||||
else if (parseInt(item.quantity) >= parseInt(existingItem.quantity)) text = `${character.name} ${commandName} all of the ${displayItemName}.`
|
||||
else text = `\n${character.name} ${commandName} ${item.quantity} ${displayItemName}.\n`
|
||||
|
||||
existingItem.quantity -= item.quantity
|
||||
|
@ -1197,7 +1197,7 @@ function doDrop(command) {
|
|||
}
|
||||
if (existingItem.quantity > 0) {
|
||||
displayItemName = existingItem.name.plural(existingItem.quantity == 1)
|
||||
text += `${character.name} now ${haveWord} ${existingItem.quantity} ${displayItemName}.\n`
|
||||
text += ` ${character.name} now ${haveWord} ${existingItem.quantity} ${displayItemName}.\n`
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue