2

I'm developing a turn-based RPG game that features three characters: Tank, Warrior, and Assassin. Each character has two attributes: maxHP and attack. Now, my goal is to create a balanced system where the Tank defeats the Warrior, the Warrior defeats the Assassin, and the Assassin defeats the Tank. For instance, the Tank could have higher maxHP but lower attack.

I'm trying to find the minimum positive integers for maxHP and attack for each character.

Let's denote the maxHP and attack of each character as follows:

  • Tank: maxHP_T, attack_T
  • Warrior: maxHP_W, attack_W
  • Assassin: maxHP_A, attack_A

In order for the Tank to defeat the Warrior, the following inequality must hold:

ceil(maxHP_T / attack_W) > ceil(maxHP_W / attack_T)

where ceil(x) is the smallest integer greater than or equal to x.

Similarly, for the Warrior to defeat the Assassin:

ceil(maxHP_W / attack_A) > ceil(maxHP_A / attack_W)

And for the Assassin to defeat the Tank:

ceil(maxHP_A / attack_T) > ceil(maxHP_T / attack_A)

how do I find the minimum positive integers for 3 characters' maxHP and the corresponding attack with the 3 inequalities above?

I guess the first thing to do is to determine if the system of inequalities is solvable. any hint would be appreciated.

JJJohn
  • 1,436
  • What does "the minimum positive integers for a set of $6$ unknowns" mean? The concept of minimum usually implies a (possibly partial) order relation. For example, between $(3,3,3,3,3,3)$ and $(2,3,3,3,3,4)$, which one is the smaller? – Taladris May 31 '23 at 13:52
  • Two thoughts: 1) The inequalities are unchanged if you multiply all unknowns by the same constant, so you may try to minimize the sum of the unknowns. 2) If you forget about the ceil functions, it is impossible for the three inequalities to be satisfied altogether (multiply all of them to see why), so it may be tricky to solve the problem, besides brute force. – Taladris May 31 '23 at 13:55
  • @Taladris thanks I've updated my OP – JJJohn May 31 '23 at 14:24

2 Answers2

1

Let $m_T:=\text{maxHP_T}$ and $a_T:=\text{attack_T}$.

There are no positive integers $m_T,a_T,m_W,a_W,m_A,a_A$ such that

$$\left\lceil\frac{m_T}{a_W} \right\rceil> \left\lceil\frac{m_W}{a_T}\right\rceil\tag1$$

$$\left\lceil\frac{m_W}{a_A} \right\rceil> \left\lceil\frac{m_A}{a_W}\right\rceil\tag2$$

$$\left\lceil\frac{m_A}{a_T} \right\rceil> \left\lceil\frac{m_T}{a_A}\right\rceil\tag3$$

Proof :

Suppose that there are positive integers $m_T,a_T,m_W,a_W,m_A,a_A$ satisfying $(1)(2)(3)$.

Then, the integers $m_T,a_T,m_W,a_W,m_A,a_A$ have to satisfy $$\frac{m_T}{a_W} > \frac{m_W}{a_T}\tag4$$

$$\frac{m_W}{a_A} > \frac{m_A}{a_W}\tag5$$

$$\frac{m_A}{a_T} >\frac{m_T}{a_A}\tag6$$

Multiplying these all together, we get $$\frac{m_Tm_Wm_A}{a_Wa_Aa_T}\gt \frac{m_Tm_Wm_A}{a_Wa_Aa_T}$$ which is impossible.

Therefore, we can say that there are no positive integers $m_T,a_T,m_W,a_W,m_A,a_A$ satisfying $(1)(2)(3)$. $\ \blacksquare$

mathlove
  • 139,939
1

Clearly you can remove the ceil without breaking the inequality, then you get maxHP_T / attack_W > maxHP_W / attack_T, which is maxHP_T*attack_T>maxHP_W*attack_W. Do the same for the other two inequalities you get maxHP_T*attack_T>maxHP_W*attack_W>maxHP_A*attack_A>maxHP_T*attack_T, which is impossible.

sb945
  • 553