This repository has been archived by the owner on Oct 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: add even more modifierInfo cases.
- Loading branch information
Showing
1 changed file
with
21 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
/* libdogma | ||
* Copyright (C) 2012, 2013, 2014, 2015 Romain "Artefact2" Dalmaso <[email protected]> | ||
* Copyright (C) 2012, 2013, 2014, 2015, 2016 Romain "Artefact2" Dalmaso <[email protected]> | ||
* | ||
* This program is free software: you can redistribute it and/or | ||
* modify it under the terms of the GNU Affero General Public License | ||
|
@@ -411,22 +411,30 @@ foreach($json['effects'] as &$effect) { | |
]); | ||
break; | ||
|
||
case null: | ||
case 'targetID': | ||
$domain = query_or_insert_expression($json, [ | ||
'operandID' => 24, /* DEFENVIDX */ | ||
'expressionValue' => 'Self', | ||
'expressionValue' => 'Target', | ||
]); | ||
break; | ||
|
||
case 'targetID': | ||
case 'otherID': | ||
$domain = query_or_insert_expression($json, [ | ||
'operandID' => 24, /* DEFENVIDX */ | ||
'expressionValue' => 'Target', | ||
'expressionValue' => 'Other', | ||
]); | ||
break; | ||
|
||
case 'itemID': | ||
case null: | ||
$domain = query_or_insert_expression($json, [ | ||
'operandID' => 24, /* DEFENVIDX */ | ||
'expressionValue' => 'Self', | ||
]); | ||
break; | ||
|
||
default: | ||
var_dump($effect); | ||
echo $effect['modifierInfo']."\n"; | ||
fatal("modifierInfo has unknown domain: ".$modifier['domain']); | ||
|
||
} | ||
|
@@ -475,7 +483,7 @@ foreach($json['effects'] as &$effect) { | |
break; | ||
|
||
default: | ||
var_dump($effect); | ||
echo $effect['modifierInfo']."\n"; | ||
fatal("modifierInfo has unknown func: ".$modifier['func']); | ||
|
||
} | ||
|
@@ -503,6 +511,11 @@ foreach($json['effects'] as &$effect) { | |
$assocstring = 'ModAdd'; | ||
break; | ||
|
||
case 4: | ||
/* XXX: this is REALLY guesswork */ | ||
$assocstring = 'PostMul'; | ||
break; | ||
|
||
case 5: | ||
$assocstring = 'PostDiv'; | ||
break; | ||
|
@@ -517,7 +530,7 @@ foreach($json['effects'] as &$effect) { | |
break; | ||
|
||
default: | ||
var_dump($effect); | ||
echo $effect['modifierInfo']."\n"; | ||
fatal("modifierInfo has unknown operator: ".$modifier['operator']); | ||
|
||
} | ||
|