Bug - Fixed Casting Smile of Mr. A. multiple times from CLI does not work

plus4

New member
Using the latest build. To reproduce, you must have a Golden Mr. A. Type "cast 5 smile on (playername)", it will only cast it once. Casting other skills multiple times still works fine. (Maybe this has something to do with the skill now costing 0 MP?)
 

plus4

New member
The behavior is the same regardless of how much MP the player has.

I quickly checked what's going on. The buffCount calculations were all made correctly. In UseSkillRequest.java, mafia checked if this skill needed MP. When SkillDatabase.isNonMpCostSkill( skillId ) came back with true, it just called run in GenericRequest. That made a single post to the server, but it did not pass the buff count, only the skill id and target player. So the skill was cast once and the count was silently ignored.

I haven't tested it with any other 0 MP skill (not even sure which are the other ones), but I would guess all of them suffer from the same problem: the skill is only cast once. To do multiple casts, the player has to issue the same CLI command repeatedly or do it from the browser.
 

lostcalpolydude

Developer
Staff member
The other ones are zombie skills, and mafia has special handling in ChoiceManager for those, so the quantity field isn't relevant. It wouldn't hurt to include it for those requests anyway, and that should probably fix smile casting, though I won't be able to test it since I don't have the skill. I'll put in something by tomorrow unless I think of a reason not to fix it that way.
 
Top