Also, you can get it down to one line by having a dictionary with keys and arrays.
That would get rid of any if statements.
Armor_type would have to start at 0, or you'd need to set a value in the array for the 0 value, if you wanted it to start at 1.
This seems to work for me:
extends Node2D
func _ready():
var dm = { "dm1": [1.5, 1 , 1, 0.7, 0.3],
"dm2": [0.7, 1.5, 1, 1, 0.3 ],
"dm3": [1, 0.7, 1.5, 1, 0.3 ],
"dm4": [1, 1, 0.7, 1.5, 0.3 ],
"dm5": [0.3, 1, 0, 0, 0 ] }
var attack_type = 4
var armor_type = 2
print(dm.get("dm"+str(attack_type))[armor_type])