|
Post by FMY on Dec 17, 2007 0:17:48 GMT
All files are loaded in a slightly different way now (to fix cross-platform problems), but what do you mean with "I can't get images to change from input"?
New abilities will work in this way:
we make an abilities or traits package, in which we put a class for each ability, all subclasses of an abstract Ability class.
When defining the pokemon's properties in XML, you do:
<pokemon> ... (data) <abilities> <ability name="Ability1" chance="0.25" /> <ability name="Ability2" chance="0.75" /> </abilities> ... (data) </pokemon>
When loading the pokemon, jepe chooses one of the 2 abilities randomly (using the chance things). Say it chooses "Ability2", then it dynamicly loads the needed class from the ability package (or crashes, when it's not available).
I don't know if it would be possible to define abilities in XML, simply because I don't know how flexible they have to be, but if it would be possible, doing that would be even better than the dynamicly loaded classes of course.
|
|
|
Post by BonzaiRob on Dec 17, 2007 10:04:45 GMT
It would be nice to define them in XML, simply o keep everything accessible for people who don't know Java, but I think it will have to be in classes.. Abilities vary from preventing sleep, to influencing weather, to changing type, to finding items after a battle, to making eggs hatch faster.
And in the TestBattle, I have a set of clauses to change a avariable's value from 1-4 depending on what arrow key is pressed, and then in render there's another set that is supposed to change the x/y of an image depending on that variable. But it'snot changing. I can't commit to the SVN at the moment either :/
EDIT: Ok, SVN works now I've updated Eclipse. You can see it in jepe.part.TestBattle.
|
|