foodfield rent calc

This commit is contained in:
Johannes Schmelz 2024-12-03 00:40:43 +01:00
parent 14ceb9dc67
commit 031ac52670

View File

@ -352,10 +352,10 @@ public class Player implements FieldVisitor<Void>{
public Void visit(FoodField field) {
if(field.getOwner() == null) {
if (field.getPrice() <= accountBalance) getHandler().getLogic().send(this, new BuyPropertyRequest());
} else {
int factor = 4;
} else if (field.getOwner() != this){
int factor = 40;
if (field.getOwner().getNumProp(field) == 2) {
factor = 10;
factor = 100;
}
int rent = rollResult.calcTotal()*factor;
field.getOwner().earnMoney(rent);