Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
animals [2020/03/18 23:02] saph Removed an outdated reference |
animals [2020/04/07 02:35] aster |
||
---|---|---|---|
Line 23: | Line 23: | ||
< | < | ||
< | < | ||
- | An animal attack can be on a person, on a project thereby decreasing its progress after having disrupted it, or on a domesticated animal. Animals attacking people can put them into an incapable state if they are low on health and standing outside. Animals will not finish off an incapable person. Tamed animals have a natural regeneration rate of +6 health per day. Barns allow them to heal +12 health per day. Walls completely remove attacks from wild animals against | + | An animal attack can be on a person, on a project thereby decreasing its progress after having disrupted it, or on a domesticated animal. Animals attacking people can put them into an incapable state if they are low on health and standing outside. Animals will not finish off an incapable person. Tamed animals have a natural regeneration rate of +6 health per day. Barns allow them to heal +12 health per day. Walls completely remove attacks from wild animals against |
Characters are safe from animal attacks in buildings and <a href=" | Characters are safe from animal attacks in buildings and <a href=" | ||
</ | </ | ||
Line 88: | Line 88: | ||
</ | </ | ||
</ | </ | ||
- | </ | ||
</p> | </p> | ||
< | < | ||
<div class=" | <div class=" | ||
- | <table class=" | + | < |
< | < | ||
<tr> | <tr> | ||
- | | + | |
- | | + | < |
- | <th scope=" | + | < |
- | <th scope=" | + | < |
- | <th scope=" | + | < |
- | | + | < |
- | <th scope=" | + | < |
- | | + | < |
- | | + | < |
- | | + | < |
- | | + | < |
- | | + | < |
- | | + | < |
</tr> | </tr> | ||
</ | </ | ||
Line 242: | Line 241: | ||
</ | </ | ||
</ | </ | ||
+ | <script type=" | ||
+ | function sortTable(n, | ||
+ | var shouldSwitch, | ||
+ | var table = document.getElementById(tableId); | ||
+ | var switching = true; | ||
+ | |||
+ | var dir = " | ||
+ | |||
+ | while (switching) { | ||
+ | switching = false; | ||
+ | var rows = table.rows; | ||
+ | |||
+ | for (var i = 1; i < (rows.length - 1); i++) { | ||
+ | shouldSwitch = false; | ||
+ | |||
+ | var x = rows[i].getElementsByTagName(" | ||
+ | var y = rows[i + 1].getElementsByTagName(" | ||
+ | |||
+ | if (dir == " | ||
+ | if ((!isNaN(x.innerHTML) && parseFloat(x.innerHTML) > parseFloat(y.innerHTML)) || | ||
+ | (isNaN(x.innerHTML) && x.innerHTML.toLowerCase() > y.innerHTML.toLowerCase())) { | ||
+ | shouldSwitch = true; | ||
+ | break; | ||
+ | } | ||
+ | } else if (dir == " | ||
+ | if ((!isNaN(x.innerHTML) && parseFloat(x.innerHTML) < parseFloat(y.innerHTML)) || | ||
+ | (isNaN(x.innerHTML) && x.innerHTML.toLowerCase() < y.innerHTML.toLowerCase())) { | ||
+ | shouldSwitch = true; | ||
+ | break; | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | if (shouldSwitch) { | ||
+ | rows[i].parentNode.insertBefore(rows[i + 1], rows[i]); | ||
+ | switching = true; | ||
+ | switchCount++; | ||
+ | } else { | ||
+ | if (switchCount == 0 && dir == " | ||
+ | dir = " | ||
+ | switching = true; | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | / | ||
</ | </ |