PHP (category archive)Page 2 of 3
… function unitstats($unit) { …
/* gets the stats of a particular unit */
$stats = array();
if ($unit == 'l') {
$stats['atk'] = 24;
$stats['def'] = 18;
} elseif ($unit == ‘e’) {
$stats['atk'] = 4;
$stats['def'] = 2;
} elseif ($unit == ’s’) {
$stats['atk'] = 12;
$stats['def'] = 4;
} elseif ($unit == ‘r’) {
$stats['atk'] = 2;
$stats['def'] = 4;
} elseif ($unit == ‘o’) {
$stats['atk'] = 12;
$stats['def'] = 6;
} elseif ($unit == ‘a’) {
$stats['atk'] = 12;
$stats['def'] = 4;
}
return $stats;
}
… $avb = round($stats1['atk'] / $stats2['def']); …
$bva = round($stats2['atk'] / $stats1['def']);
$health1 -= $bva;
$health2 -= $avb;
Development is going strong.


- “What’s Authority?”
- It’s the new online game I’m creating: somewhat of a followup to Territory that focuses on and adds new elements to the Territory concept.
- “Yeah, but… what is it?”
- I’ll avoid making any specific comments about it because I can’t be sure what components I will ultimately include. Also, I like being mysterious. With that, I present you a rather stylish mockup of what a section of the game map would look like:

- “Question leading on to further advertising.”
- I’m glad you asked. It may look complex, but it is actually quite simple once you know the rules.
So, stay tuned for Authority.
This is the first release of Opinionated (the software). Everything you need is included in the zip: edit the variables in connect.php to suit your database, edit the $settings array in start.php to customise the strings, and import the contents of opinionated.sql into a new database.
Note: there is an extra array key you can customise that is not included by default in the source release: submittext. This defines a message displayed on the ’submit’ page: to use it, add something along the lines of
'submittext' => '<p>By submitting this entry, you agree to our rules of use</p>',
to the array definition.
Download
- Source (zip) — 19.6KB
Opinionated is my new project and an experiment in democracy and content. Here anyone can (once they have signed up) post opinions of any kind—links, humour, insight, whatever—andother people can rate it. This is a minimalistic project, so there’s not much in the way of fancy features. Work out the navigation for yourself. Visit it, sign up, have your say, and help sort the wheat from the chaff.*
* at time of writing, it’s all chaff.
http://territory.maestrosync.com/
http://territory.maestrosync.com/
http://territory.maestrosync.com/
http://territory.maestrosync.com/
http://territory.maestrosync.com/
Not a lot to see.


“interolex”
