Closed Tom-0169 closed 9 years ago
I have added some Testcases, and it looks fine to me:
/**
* Tests the '{@link de.urszeidler.eclipse.shr5.ChrakterLimits#getGeistig()
* <em>Geistig</em>}' feature getter. <!-- begin-user-doc --> <!--
* end-user-doc -->
*
* @see de.urszeidler.eclipse.shr5.ChrakterLimits#getGeistig()
* @generated not
*/
public void testGetGeistig() {
fixture.setLogikBasis(1);
fixture.setIntuitionBasis(2);
fixture.setWillenskraftBasis(2);
assertEquals("limit need to be 2", 2, fixture.getGeistig());
fixture.setLogikBasis(3);
fixture.setIntuitionBasis(3);
fixture.setWillenskraftBasis(4);
assertEquals("limit need to be 5", 5, fixture.getGeistig());
// megapulse example
fixture.setLogikBasis(4);
fixture.setIntuitionBasis(4);
fixture.setWillenskraftBasis(3);
assertEquals("limit need to be 5", 5, fixture.getGeistig());
//rob example
fixture.setLogikBasis(3);
fixture.setIntuitionBasis(3);
fixture.setWillenskraftBasis(4);
assertEquals("limit need to be 5", 5, fixture.getGeistig());
// anoher
fixture.setLogikBasis(1);
fixture.setIntuitionBasis(1);
fixture.setWillenskraftBasis(1);
assertEquals("limit need to be 2", 2, fixture.getGeistig());
}
The code is straight forward:
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated not
*/
public int getGeistig() {
double baselimit1 = ((getLogik() * 2) + getIntuition() + getWillenskraft()) / 3.0;
int baselimit = (int) Math.ceil(baselimit1);
int getmodWert = modManager.getmodWert(Shr5Package.Literals.CHRAKTER_LIMITS__GEISTIG);
return baselimit + getmodWert;
}
If you have an example it would be helpful. Simply open the issue again.
It's reproducable, but minor. The base code is good. Create a character, type in the attributes. Type in Logic last. Don't hit enter. Instead leave directly to a skillgroup. I think it's a minor glitch in the UI. Something like a an mouse-event don't starting
(Sorry new to this, have to look at the documentation for re-opening an issue)
I see, will take a look at the notifications, thanks.
Mental [(Logic x 2 ) + Intuition + Willpower] / 3 (round up) Physical [(Strength x 2) + Body + Reaction] / 3 (round up) Social [(Charisma x 2) + Willpower + Essence] / 3 (round up)