rebalance armor and hp limits
This commit is contained in:
@@ -306,7 +306,7 @@ async def toss_coin():
|
||||
@mcp.tool()
|
||||
async def create_player(name: str, strength: int, dexterity: int, intelligence: int, wisdom: int, charisma: int, hp: int, armor: int, speed: int, item_id:str):
|
||||
"""Create a new player. Need all the stats to function properly. Throw a d20 for every stats you don't have,
|
||||
and a d50 for the armor and speed.
|
||||
and a d50 for the armor and a d100 for speed.
|
||||
|
||||
Args:
|
||||
name: Name of the player
|
||||
@@ -330,7 +330,7 @@ async def create_player(name: str, strength: int, dexterity: int, intelligence:
|
||||
charisma=charisma,
|
||||
hp=20 + hp,
|
||||
armor=50 + armor,
|
||||
speed= 50 + speed,
|
||||
speed= speed,
|
||||
equipped_item=game.get_item(item_id)) # Check if item exists
|
||||
game.add_item_to_entity(item_id=item_id, entity_id=player_id)
|
||||
player_dict = game.get_player(player_id=player_id).serialize()
|
||||
@@ -349,7 +349,7 @@ async def create_player(name: str, strength: int, dexterity: int, intelligence:
|
||||
@mcp.tool()
|
||||
async def create_npc(name: str, strength: int, dexterity: int, intelligence: int, wisdom: int, charisma: int, hp: int, armor: int, speed: int, item_id:str):
|
||||
"""Create a new NPC. Need all the stats to function properly. Throw a d20 for every stats you don't have,
|
||||
and a d50 for the armor and speed.
|
||||
and a d50 for the armor and a d100 for speed.
|
||||
|
||||
Args:
|
||||
name: Name of the NPC
|
||||
@@ -366,7 +366,7 @@ async def create_npc(name: str, strength: int, dexterity: int, intelligence: int
|
||||
logging.info(f"Creating NPC named {name}")
|
||||
try:
|
||||
item = game.get_item(item_id) # Check if item exists
|
||||
npc_id = game.create_npc(name=name, strength=strength, dexterity=dexterity, intelligence=intelligence, wisdom=wisdom, charisma=charisma, hp=20 + hp, armor=50 + armor, speed=50 + speed, equipped_item=item)
|
||||
npc_id = game.create_npc(name=name, strength=strength, dexterity=dexterity, intelligence=intelligence, wisdom=wisdom, charisma=charisma, hp=20 + hp, armor=50 + armor, speed= speed, equipped_item=item)
|
||||
game.add_item_to_entity(item_id=item_id, entity_id=npc_id)
|
||||
npc_dict = game.get_npc(npc_id=npc_id).serialize()
|
||||
logging.info(f"Creation of NPC successful")
|
||||
|
||||
Reference in New Issue
Block a user