RanvierMUD / bundle-example-lib

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Have comma interpreted as AND on command parser

marcelomoreli opened this issue · comments

Can you please implement the commandParser so that it can accept multiple keywords to use as AND condition?

Example: "get long,sword" would get the items that have both 'long' and 'sword'.
"kill fire,mage" in a room that has "ice mage, fire mage, fire monster" would get the NPC named "fire mage", and so on.

As part of this issue, can you please also fix it so that it doesn't look for any part of the argument in the name?
Example: Right now look ood will find the "Wooden Chest". Even look t will find the Wooden Chest.

Can we make it so that it only returns if the keywords STARTS with the args?
Examples related to "Wooden Chest"
look o -> Will not find it
look w -> will find it
look wo -> will find it
look c -> will find it
look est -> will not find it
look w,e -> will not find it
look w,c -> will find it
look woo,ch -> will find it

commented

These are both cool fixes/improvements, good call.