![]() |
Item stat Bonuses? - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Programming (https://mirage-engine.uk/forums/forumdisplay.php?fid=24) +----- Forum: Visual Basic 6 (https://mirage-engine.uk/forums/forumdisplay.php?fid=32) +----- Thread: Item stat Bonuses? (/showthread.php?tid=3055) |
Item stat Bonuses? - Nean - 15-08-2009 Okay, so I was adding in item stat bonuses, and I managed to get it to work. But I get this dirty feeling that I did it sloppy, so I'd appreciate it if some of you good fellows could give it a once over, and tell me how it looks, and how I could improve it, should it need improving. Here's an example: Code: Case ITEM_TYPE_WEAPON Re: Item stat Bonuses? - Matt - 15-08-2009 I would personally add temp variables for each of those. Then when each of those are checked, like in the functions with the formulas, I would add them together if there was a bonus. Instead of adding it like that. When I did it your way, some stuff would fuck up and I would end up with negative stats. Lol. It's hard to kill things with -16 str.. Re: Item stat Bonuses? - Nean - 15-08-2009 Matt Wrote:I would personally add temp variables for each of those. Then when each of those are checked, like in the functions with the formulas, I would add them together if there was a bonus. Instead of adding it like that. When I did it your way, some stuff would fuck up and I would end up with negative stats. Lol. Yeah, very good point. Thanks, I'll go rewrite that. |